List of usage examples for java.awt Graphics drawString
public abstract void drawString(AttributedCharacterIterator iterator, int x, int y);
From source file:Main.java
public void paint(Graphics g) { Font f = g.getFont();// w ww . j a v a2s .c o m System.out.println(f.isBold()); g.drawString("java2s.com", 4, 16); }
From source file:Main.java
public void paint(Graphics g) { g.setColor(Color.BLACK); g.drawString("Applet background example", 0, 50); }
From source file:Main.java
public void paint(Graphics g) { Font f = g.getFont();//from w ww. ja v a 2 s . co m System.out.println(f.isPlain()); g.drawString("java2s.com", 4, 16); }
From source file:Main.java
public void paint(Graphics g) { Font f = g.getFont();// ww w .ja va 2 s .c o m System.out.println(f.isItalic()); g.drawString("java2s.com", 4, 16); }
From source file:Main.java
public void paint(Graphics g) { Font f = g.getFont();/*from www . jav a2 s. c o m*/ System.out.println(f.hashCode()); g.drawString("java2s.com", 4, 16); }
From source file:Main.java
public void paint(Graphics g) { Font f = g.getFont();/*from w w w . j a va2 s . co m*/ System.out.println(f.toString()); g.drawString("java2s.com", 4, 16); }
From source file:Main.java
public void paint(Graphics g) { Font f = g.getFont();/*from w ww. j a v a 2s .c o m*/ System.out.println(f.getSize2D()); g.drawString("java2s.com", 4, 16); }
From source file:Main.java
public void paint(Graphics g) { Font f = g.getFont();//w w w. j a v a 2s. com System.out.println(f.getTransform()); g.drawString("java2s.com", 4, 16); }
From source file:Main.java
public void paint(Graphics g) { Font f = g.getFont();/* www .ja v a 2 s . com*/ System.out.println(f.isTransformed()); g.drawString("java2s.com", 4, 16); }
From source file:Main.java
private void drawString(Graphics g, String text, int x, int y) { for (String line : text.split("\n")) g.drawString(line, x, y += g.getFontMetrics().getHeight()); }