>Hi ppl,
> Just to confirm. Java JDK1.2.1 or anything lower than that does
>not have the ability to display any Arabic fonts.
> Yes or No.
>Thanks Farhan
Just a couple of days ago, someone posted some example
code using Arabic. It was called ArabicExample.
I tried it out and it worked great under both
1.2 and 1.2.1. Admittedly, it was only a couple of characters.
Here it is, with my apologies to the author.
The important thing is to use Swing. Regular AWT won't work.
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class ArabicExample {
public static void main(String[] args) {
JFrame f = new JFrame("ArabicExample v1.0");
f.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent we) { System.exit(0); }
});
f.setSize(200, 200);
f.setLocation(200, 200);
JTextField field = new JTextField(10);
field.setFont(new Font("Lucida Sans Regular", Font.PLAIN, 12));
field.setText("\u062e\u0644\u0639");
f.getContentPane().setLayout(new FlowLayout());
f.getContentPane().add(field);
f.setVisible(true);
}
}
Hope this helps.
--
Ed Gomolka ([EMAIL PROTECTED])
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]