Class InfoPanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class InfoPanel extends JPanel
Component used for displaying information. It contains a slot for an icon, plus a number of aligned component pairs. The intention is that these form (label,value) pairs.
See Also:
  • Constructor Details

    • InfoPanel

      public InfoPanel()
      Constructs a new InfoPanel.
  • Method Details

    • setIcon

      public void setIcon(Icon icon)
      Sets the icon for this panel.
      Parameters:
      icon - the icon to add (or null)
    • addItem

      public void addItem(JComponent label, JComponent value)
      Adds a new label, value pair to the panel.
      Parameters:
      label - component to serve as a label for this item
      value - component to serve as a value for this item
    • getMaximumSize

      public Dimension getMaximumSize()
      Overrides:
      getMaximumSize in class JComponent