Class ActionLabel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, SwingConstants
Direct Known Subclasses:
UriLabel

public class ActionLabel extends JLabel
A JLabel which fires action events when clicked.
See Also:
  • Constructor Details

    • ActionLabel

      public ActionLabel()
      Constructs an ActionLabel instance. The label is aligned against the leading edge of its display area, and centered vertically.
    • ActionLabel

      public ActionLabel(String text)
      Constructs an ActionLabel instance with the specified text. The label is aligned against the leading edge of its display area, and centered vertically.
      Parameters:
      text - The text to be displayed by the label.
    • ActionLabel

      public ActionLabel(String text, ActionListener action)
      Constructs an ActionLabel instance with the specified text and action. The label is aligned against the leading edge of its display area, and centered vertically.
      Parameters:
      text - The text to be displayed by the label.
      action - The action to be performed if the label is clicked.
  • Method Details

    • addActionListener

      public void addActionListener(ActionListener actionListener)
    • removeActionListener

      public void removeActionListener(ActionListener actionListener)
    • getActionListeners

      public ActionListener[] getActionListeners()
    • fireActionPerformed

      protected void fireActionPerformed()
    • fireActionPerformed

      protected void fireActionPerformed(ActionEvent event)