FileDocCategorySizeDatePackage
SecretTest.javaAPI DocExample897Mon Nov 09 12:45:52 GMT 1998None

SecretTest

public class SecretTest extends JFrame

Fields Summary
Constructors Summary
public SecretTest()

    super("EventListenerList Demo");
    setSize(200, 100);
    addWindowListener(new BasicWindowMonitor());

    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);