FileDocCategorySizeDatePackage
SecretTest.javaAPI DocExample892Thu Oct 24 20:14:28 BST 2002None

SecretTest

public class SecretTest extends JFrame

Fields Summary
Constructors Summary
public SecretTest()

    super("EventListenerList Demo");
    setSize(200, 100);
    setDefaultCloseOperation(EXIT_ON_CLOSE);

    SecretLabel secret = new SecretLabel("Try Clicking Me");
    final JLabel reporter = new JLabel("Event reports will show here...");
    secret.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent ae) {
        reporter.setText("Got it: " + ae.getActionCommand());
      }
    } );
    getContentPane().add(secret, BorderLayout.NORTH);
    getContentPane().add(reporter, BorderLayout.SOUTH);    
  
Methods Summary
public static voidmain(java.lang.String[] args)

    SecretTest st = new SecretTest();
    st.setVisible(true);