Results 1 to 1 of 1
Thread: TextArea with Unicode
-
TextArea with Unicode
Java Code:import java.awt.*; import java.awt.event.*; import javax.swing.*; public class JTextAreaDemo extends JFrame { String davidMessage = "David says, \"\u05E9\u05DC\u05D5\u05DD \u05E2\u05D5\u05DC\u05DD\" \n"; String andyMessage = "Andy also says, \"\u05E9\u05DC\u05D5\u05DD \u05E2\u05D5\u05DC\u05DD\""; public JTextAreaDemo() { super("JTextAreaDemo"); GraphicsEnvironment.getLocalGraphicsEnvironment(); Font font = new Font("LucidaSans", Font.PLAIN, 40); JTextArea textArea = new JTextArea(davidMessage + andyMessage); textArea.setFont(font); this.getContentPane().add(textArea); textArea.show(); } public static void main(String[] args) { JFrame frame = new JTextAreaDemo(); frame.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) {System.exit(0);} }); frame.pack(); frame.setVisible(true); } }"The sole cause of man’s unhappiness is that he does not know how to stay quietly in his room." - Blaise Pascal
Similar Threads
-
How to get the position of character in TextArea
By loganathan.lakshmanan in forum JavaServer Pages (JSP) and JSTLReplies: 1Last Post: 01-19-2008, 12:06 AM -
TextArea Bug?
By Soda in forum New To JavaReplies: 2Last Post: 12-07-2007, 12:37 PM -
Help unicode character
By JT4NK3D in forum New To JavaReplies: 3Last Post: 11-18-2007, 07:55 AM -
problems when I print in textarea
By gabriel in forum New To JavaReplies: 1Last Post: 07-26-2007, 06:57 PM -
textarea
By ubuntu in forum AWT / SwingReplies: 4Last Post: 05-12-2007, 09:54 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks