FileDocCategorySizeDatePackage
SecretLabel.javaAPI DocExample1346Mon Nov 09 12:45:52 GMT 1998None

SecretLabel

public class SecretLabel extends JLabel implements MouseListener

Fields Summary
Constructors Summary
public SecretLabel(String msg)

    super(msg);
    addMouseListener(this);
  
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.getListenerList();
    for (int i = listeners.length - 2; i >= 0; i--) {
      if (listeners[i] == ActionListener.class) {
        ((ActionListener)listeners[i+1]).actionPerformed(ae);
      }
    }
  
public voidmouseClicked(java.awt.event.MouseEvent me)

    fireActionPerformed(new ActionEvent(this, ActionEvent.ACTION_PERFORMED, 
                                        "SecretMessage"));
  
public voidmouseEntered(java.awt.event.MouseEvent me)

public voidmouseExited(java.awt.event.MouseEvent me)

public voidmousePressed(java.awt.event.MouseEvent me)

public voidmouseReleased(java.awt.event.MouseEvent me)

public voidremoveActionListener(java.awt.event.ActionListener l)

    listenerList.remove(ActionListener.class, l);