Class LineBox

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class LineBox extends JPanel
Layout utility component that places components in a horizontal Box.
Since:
13 Mar 2013
Author:
Mark Taylor
See Also:
  • Constructor Details

    • LineBox

      public LineBox(String label, JComponent comp, boolean postGap)
      Constructs a box with a label, body component, and optional small vertical gap below it.
      Parameters:
      label - text label
      comp - arbitrary component
      postGap - true for trailing vertical pad
    • LineBox

      public LineBox(String label, JComponent comp)
      Constructs a box with a label, body component and no trailing gap.
      Parameters:
      label - text label
      comp - arbitrary component
    • LineBox

      public LineBox(JComponent comp)
      Constructs a box with just a body component.
      Parameters:
      comp - arbitrary component
  • Method Details

    • getLabel

      public JLabel getLabel()
      Returns the JLabel component of this line box.
      Returns:
      label component, may be null
    • getComponent

      public JComponent getComponent()
      Returns the labelled component part of this line box.
      Returns:
      component presented at construction time, may be null
    • setEnabled

      public void setEnabled(boolean isEnabled)
      Overrides:
      setEnabled in class JComponent