I am trying to write a bilingual editor (English and Farsi) with unicode.
I found that TextLayout could help me, but my first simple program in Applet form doesn't work.
you could find the paint section below. The program compiles without error and runs but I could not see anything on the applet page.
Please help
public void paint(Graphics g) {
Graphics2D g2;
g2 = (Graphics2D) g;
FontRenderContext frc = g2.getFontRenderContext();
Font f = new Font("Times",Font.BOLD, 24);
String s = new String("24 Point Times Bold");
TextLayout tl = new TextLayout(s, f, frc);
Dimension theSize= getSize();
g2.setColor(Color.green);
tl.draw(g2, theSize.width/30, theSize.height/2);
}