FileDocCategorySizeDatePackage
SimpleApplet2.javaAPI DocExample1049Thu Oct 24 20:14:24 BST 2002None

SimpleApplet2

public class SimpleApplet2 extends JApplet

Fields Summary
Constructors Summary
public SimpleApplet2()

    // Suppress warning message on older versions if needed...
    // getRootPane().putClientProperty("defeatSystemEventQueueCheck",
    // Boolean.TRUE);
  
Methods Summary
public voidstart()

    SwingUtilities.invokeLater(new Runnable() {
      public void run() { // run in the event thread . . .
        JPanel p = new JPanel();
        p.setLayout(new GridLayout(2, 2, 2, 2));
        p.add(new JLabel("Username"));
        p.add(new JTextField());
        p.add(new JLabel("Password"));
        p.add(new JPasswordField());
        Container content = getContentPane();
        content.setLayout(new GridBagLayout()); // used to center the panel
        content.add(p);
        validate();
      }
    });