FileDocCategorySizeDatePackage
SecretLabel.javaAPI DocExample1192Thu Oct 24 20:14:28 BST 2002None

SecretLabel

public class SecretLabel extends JLabel

Fields Summary
Constructors Summary
public SecretLabel(String msg)

    super(msg);
    addMouseListener(new MouseAdapter() {
      public void mouseClicked(MouseEvent me) {
        fireActionPerformed(new ActionEvent(SecretLabel.this, 
                                            ActionEvent.ACTION_PERFORMED, 
                                            "SecretMessage"));
      }
    });
  
Methods Summary
public voidaddActionListener(java.awt.event.ActionListener l)

    // We'll just use the listenerList we inherit from JComponent.
    listenerList.add(ActionListener.class, l);
  
protected voidfireActionPerformed(java.awt.event.ActionEvent ae)

    Object[] listeners = listenerList.getListeners(ActionListener.class);
    for (int i = 0; i < listeners.length; i++) {
      ((ActionListener)listeners[i]).actionPerformed(ae);
    }
  
public voidremoveActionListener(java.awt.event.ActionListener l)

    listenerList.remove(ActionListener.class, l);