Class BasicErrorPaneUI.EqualSizeJButton

All Implemented Interfaces:
ImageObserver, ItemSelectable, MenuContainer, Serializable, Accessible, SwingConstants
Enclosing class:
BasicErrorPaneUI

private static final class BasicErrorPaneUI.EqualSizeJButton extends JButton
This is a button that maintains the size of the largest button in the button group by returning the largest size from the getPreferredSize method. This is better than using setPreferredSize since this will work regardless of changes to the text of the button and its language.
  • Field Details

  • Constructor Details

    • EqualSizeJButton

      public EqualSizeJButton(String text)
    • EqualSizeJButton

      public EqualSizeJButton(Action a)
  • Method Details

    • setGroup

      public void setGroup(BasicErrorPaneUI.EqualSizeJButton[] group)
    • getRealPreferredSize

      private Dimension getRealPreferredSize()
      Returns the actual preferred size on a different instance of this button
    • getPreferredSize

      public Dimension getPreferredSize()
      If the preferredSize has been set to a non-null value just returns it. If the UI delegate's getPreferredSize method returns a non null value then return that; otherwise defer to the component's layout manager.
      Overrides:
      getPreferredSize in class JComponent
      Returns:
      the value of the preferredSize property
      See Also: