Class SmallBorderButton

All Implemented Interfaces:
ImageObserver, ItemSelectable, MenuContainer, Serializable, Accessible, SwingConstants

public class SmallBorderButton extends JButton
Class that is a JButton that has an empty border and adds a mouse listener so that the button looks raised when the mouse pointer enters the button, and looks lowered when the mouse pointer exits the button.
See Also:
  • Field Details

    • RAISED_BORDER

      public static final Border RAISED_BORDER
      A raised beveled border.
    • NO_BORDER

      public static final Border NO_BORDER
      An empty border.
    • LOWERED_BORDER

      public static final Border LOWERED_BORDER
      A lowered border beveled border.
  • Constructor Details

    • SmallBorderButton

      public SmallBorderButton()
      Construct a new EmptyBorderButton.
    • SmallBorderButton

      public SmallBorderButton(String text)
      Construct a new EmptyBorderButton that has the given button text.
      Parameters:
      text - text of the button
    • SmallBorderButton

      public SmallBorderButton(Action a)
      Construct a new EmptyBorderButton that has an associated action.
      Parameters:
      a - action for the button
    • SmallBorderButton

      public SmallBorderButton(Icon icon)
      Construct a new EmptyBorderButton that has an icon.
      Parameters:
      icon - icon for the button
    • SmallBorderButton

      public SmallBorderButton(String text, Icon icon)
      Construct a new EmptyBorderButton that has text and an icon.
      Parameters:
      text - button text
      icon - icon for the button
  • Method Details

    • clearBorder

      public void clearBorder()
      Clear the border on this button and set it to NO_BORDER.
    • setOverrideBorder

      public void setOverrideBorder(Border overrideBorder)
      Override the default border created by this button.
      Parameters:
      overrideBorder - new border to use