TextArea with Unicode : Code Unicode : Development Class : Java examples (example source code) Organized by topic

Java
C++
PHP
Java Home »  Development Class   » [  Code Unicode  ]  Screenshots 
 



TextArea with Unicode




/*
Java Internationalization
By Andy Deitsch, David Czarnecki

ISBN: 0-596-00019-7
O'Reilly
*/
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);
  }
}



           
       
Related examples in the same category
1.  Unicode sorting Unicode sorting
2.  Unicode: Fonts and Text Rendering Unicode: Fonts and Text Rendering
3.  Unicode: TrueType Font Test Unicode: TrueType Font Test
4.  Unicode: test layout Unicode: test layout
5.  Conversion between Unicode characters and Strings Conversion between Unicode characters and Strings
6.  Convert among Unicode, ASCII and byte/int Convert among Unicode, ASCII and byte/int
7.  Unicode - show a page of Unicode characters
8.  Vis - make special characters visible
9.  Demonstrate creating readers and writers with a specific encoding
10.  Unicode display Unicode display
11.  Internationalized Graphical User Interfaces: unicode cut and paste Internationalized Graphical User Interfaces: unicode cut and paste
12.  Stream Converter Unicode Stream Converter Unicode
13.  String Converter Unicode String Converter Unicode








Home| Contact Us
Copyright 2003 - 04 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.