FileDocCategorySizeDatePackage
SimpleApplet.javaAPI DocExample808Mon Nov 09 12:45:54 GMT 1998None

SimpleApplet

public class SimpleApplet extends JApplet

Fields Summary
Constructors Summary
public SimpleApplet()


    // supress warning message
    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();
      }
    });