Frontpage web hosting - Appendix K Unicode (on CD) 1495 public class
Appendix K Unicode (on CD) 1495 public class Unicode extends JFrame { 11 private JLabel english, chinese, cyrillic, french, german, 12 japanese, portuguese, spanish; 13 14 // Unicode constructor 15 public Unicode() 16 { 17 super( “Demonstrating Unicode” ); 18 19 // get content pane and set its layout Container container = getContentPane(); 21 container.setLayout( new GridLayout( 8, 1 ) ); 22 23 // JLabel constructor with a string argument 24 english = new JLabel( “u0057u0065u006Cu0063u006F” + 25 “u006Du0065u0020u0074u006Fu0020Unicodeu0021″ ); 26 english.setToolTipText( “This is English” ); 27 container.add( english ); 28 29 chinese = new JLabel( “u6B22u8FCEu4F7Fu7528u0020″ + “u0020Unicodeu0021″ ); 31 chinese.setToolTipText( “This is Traditional Chinese” ); 32 container.add( chinese ); 33 34 cyrillic = new JLabel( “u0414u043Eu0431u0440u043E” + 35 “u0020u043Fu043Eu0436u0430u043Bu043Eu0432″ + 36 “u0430u0422u044Au0020u0432u0020Unicodeu0021″ ); 37 cyrillic.setToolTipText( “This is Russian” ); 38 container.add( cyrillic ); 39 french = new JLabel( “u0042u0069u0065u006Eu0076″ + 41 “u0065u006Eu0075u0065u0020u0061u0075u0020″ + 42 “Unicodeu0021″ ); 43 french.setToolTipText( “This is French” ); 44 container.add( french ); 45 46 german = new JLabel( “u0057u0069u006Cu006Bu006F” + 47 “u006Du006Du0065u006Eu0020u007Au0075u0020″ + 48 “Unicodeu0021″ ); 49 german.setToolTipText( “This is German” ); container.add( german ); 51 52 japanese = new JLabel( “Unicodeu3078u3087u3045u3053″ + 53 “u305Du0021″ ); 54 japanese.setToolTipText( “This is Japanese” ); 55 container.add( hiragana ); 56 57 portuguese = new JLabel( “u0053u00E9u006Au0061u0020″ + 58 “u0042u0065u006Du0076u0069u006Eu0064″ + 59 “u006Fu0020Unicodeu0021″ ); portuguese.setToolTipText( “This is Portuguese” ); 61 container.add( portuguese ); 62 Fig. K.3Java program that uses Unicode encoding (part 2 of 3). Fig. K.
In case you need affordable webhost to host your website, our recommendation is ecommerce web host services.