FileDocCategorySizeDatePackage
Unicode.javaAPI DocExample3982Sun Feb 24 19:37:50 GMT 2002None

Unicode

public class Unicode extends JFrame

Fields Summary
private JLabel
english
private JLabel
chinese
private JLabel
cyrillic
private JLabel
french
private JLabel
german
private JLabel
hiragana
private JLabel
portuguese
private JLabel
spanish
Constructors Summary
public Unicode()

      super( "Demonstrating Unicode" );

      // get content pane and set its layout
      Container container = getContentPane();
      container.setLayout( new GridLayout( 8, 1 ) );

      // JLabel constructor with a string argument
      english = new JLabel( "\u0057\u0065\u006C\u0063\u006F" +
         "\u006D\u0065\u0020\u0074\u006F\u0020Unicode\u0021" );
      english.setToolTipText( "This is English" );
      container.add( english );
      
      chinese = new JLabel( "\u6B22\u8FCE\u4F7F\u7528\u0020" +
         "\u0020Unicode\u0021" );
      chinese.setToolTipText( "This is Traditional Chinese" );
      container.add( chinese );
      
      cyrillic = new JLabel( "\u0414\u043E\u0431\u0440\u043E" +
         "\u0020\u043F\u043E\u0436\u0430\u043B\u043E\u0432" +
         "\u0430\u0422\u044A\u0020\u0432\u0020Unicode\u0021" );
      cyrillic.setToolTipText( "This is Cyrillic" );
      container.add( cyrillic );
      
      french = new JLabel( "\u0042\u0069\u0065\u006E\u0076" +
         "\u0065\u006E\u0075\u0065\u0020\u0061\u0075\u0020" +
         "Unicode\u0021" );
      french.setToolTipText( "This is French" );
      container.add( french );
      
      german = new JLabel( "\u0057\u0069\u006C\u006B\u006F" +
         "\u006D\u006D\u0065\u006E\u0020\u007A\u0075\u0020" + 
         "Unicode\u0021" );
      german.setToolTipText( "This is German" );
      container.add( german );
      
      hiragana = new JLabel( "Unicode\u3078\u3087\u3045\u3053" +
         "\u305D\u0021" );
      hiragana.setToolTipText( "This is Hiragana" );
      container.add( hiragana );
      
      portuguese = new JLabel( "\u0053\u00E9\u006A\u0061\u0020" +
      			"\u0042\u0065\u006D\u0076\u0069\u006E\u0064" +
               "\u006F\u0020Unicode\u0021" );
      portuguese.setToolTipText( "This is Portuguese" );
      container.add( portuguese );
      
      spanish = new JLabel( "\u0042\u0069\u0065\u006E\u0076" +
         "\u0065\u006E\u0069\u0064\u0061\u0020\u0061\u0020" +
         "Unicode\u0021" );
      spanish.setToolTipText( "This is Spanish" );
      container.add( spanish );
      
   
Methods Summary
public static voidmain(java.lang.String[] args)

 
      Unicode application = new Unicode();
      application.setDefaultCloseOperation(
         JFrame.EXIT_ON_CLOSE );
      application.pack();
      application.setVisible( true );