Class GroupPanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class GroupPanel extends JPanel
GroupPanel is an class which creates a generic JPanel with a titled, etched border and with insets. The title position is set to left and center.
See Also:
  • Field Details

    • DEFAULT_BORDER_INSETS

      public static final Insets DEFAULT_BORDER_INSETS
  • Constructor Details

    • GroupPanel

      public GroupPanel()
      Construct a GroupPanel, with no title, using default settings for font and insets.
    • GroupPanel

      public GroupPanel(String title)
      Construct a GroupPanel, with specified title and default settings for font and insets.
      Parameters:
      title - the title for the title border.
    • GroupPanel

      public GroupPanel(String title, Insets insets)
      Construct a GroupPanel, with specified title and insets, using default font.
      Parameters:
      title - the title for the title border.
      insets - the insets for the title border.
    • GroupPanel

      public GroupPanel(String title, Font font)
      Construct a GroupPanel, with specified title and font, using default insets.
      Parameters:
      title - A title for the title border.
      font - A font for the title border.
      See Also:
      • Border
      • invalid reference
        javax.border.TitledBorder
    • GroupPanel

      public GroupPanel(String title, Font font, Insets insets)
      Construc a GroupPanel, with the specified title and font and insets.
      Parameters:
      title - A title for the title border.
      font - A font for the title border.
      insets - Insets for the title border.
      See Also:
      • Border
      • invalid reference
        javax.border.TitledBorder
  • Method Details

    • getTitle

      public String getTitle()
      Returns the title of the title border.
      Returns:
      title the title for the title border. Returns null if the titled border is null.
    • setTitle

      public void setTitle(String title)
      Sets the title for the title border.
      Parameters:
      title - the title for the title border.
    • getTitleFont

      public Font getTitleFont()
      Returns the font for the title border.
      Returns:
      font the font for the title border. Returns null if the title border is null.
    • setTitleFont

      public void setTitleFont(Font font)
      Sets the font for the title border.
      Parameters:
      font - the font for the title border.
    • createMargin

      protected void createMargin(Insets insets)
      Creates an empty border with the specified insets.
      Parameters:
      insets - Insets for the title border.
    • createEtchedTitleBorder

      protected void createEtchedTitleBorder(String title, Font font)
      Creates an etched, titled border with the specified title and font.
      Parameters:
      title - A string title for the border.
      font - A font for the border.