FileDocCategorySizeDatePackage
HelloInJapanese.javaAPI DocExample927Sun Jan 07 16:21:36 GMT 2001None

HelloInJapanese

public class HelloInJapanese extends JPanel

Fields Summary
static JFrame
frame
static String
helloInJapanese
Constructors Summary
public HelloInJapanese(String characters)


     
    Font theFont = new Font("Bitstream Cyberbit", Font.PLAIN, 20);
    JTextArea area = new JTextArea(characters, 2, 30);
    area.setFont(theFont);
    area.setLineWrap(true);
    JScrollPane scrollpane = new JScrollPane(area);
    add(scrollpane);
  
Methods Summary
public static voidmain(java.lang.String[] argv)


    HelloInJapanese japanesePanel = new HelloInJapanese(helloInJapanese);

    frame = new JFrame("Hello in Japanese");
    frame.addWindowListener(new WindowAdapter() {
      public void windowClosing(WindowEvent e) {System.exit(0);}
    });
    frame.getContentPane().add("Center", japanesePanel);
    frame.pack();
    frame.setVisible(true);