Package com.explodingpixels.macwidgets
Class LabeledComponentGroup
java.lang.Object
com.explodingpixels.macwidgets.LabeledComponentGroup
Creates a group of components and provides a label underneath those components. The added
components will be placed side by side, with no spacing in between them, like this:
Here are a couple more practical applications of
Here's how to create a
Here are a couple more practical applications of
LabledComponentGroup:
Here's how to create a
LabeledComponentGroup with two buttons:
JToggleButton leftButton = new JToggleButton("Left Button");
leftButton.putClientProperty("JButton.buttonType", "segmentedTextured");
leftButton.putClientProperty("JButton.segmentPosition", "first");
JToggleButton rightButton = new JToggleButton("Right Button");
rightButton.putClientProperty("JButton.buttonType", "segmentedTextured");
rightButton.putClientProperty("JButton.segmentPosition", "last");
LabeledComponentGroup group = new LabeledComponentGroup("Group", leftButton, rightButton);
-
Constructor Summary
ConstructorsConstructorDescriptionLabeledComponentGroup(String labelString, List<JComponent> components) Creates a labeled component group using the given label and components.LabeledComponentGroup(String labelString, ButtonGroup group) Creates a labeled component group using the given button group.LabeledComponentGroup(String labelString, JComponent... components) Creates a labeled component group using the given label and components. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidinit(String labelString, List<JComponent> components)
-
Constructor Details
-
LabeledComponentGroup
Creates a labeled component group using the given label and components.- Parameters:
labelString- the label of the group.components- the components in the group.
-
LabeledComponentGroup
Creates a labeled component group using the given label and components.- Parameters:
labelString- the label of the group.components- the components in the group.
-
LabeledComponentGroup
Creates a labeled component group using the given button group.- Parameters:
labelString- the label of the group.components- the components in the group.
-
-
Method Details
-
init
-
getComponent
-