public final class GUIUtilities
extends java.lang.Object
A suite of utility methods that may be useful for constructing Swing components
in a style consistent with the rest of the framework.
See also the JKeyValuePanel for easy form-based layouts,
and the Utilities class for more general utilities.
| Modifier and Type | Method and Description |
|---|---|
static javax.swing.JLabel |
createFieldLabel(java.lang.String label)
Create a
JLabel that serves as a (semantic) label for an input widget. |
public static javax.swing.JLabel createFieldLabel(java.lang.String label)
Create a JLabel that serves as a (semantic) label for an input widget.
For example, if you have a text field that is supposed to hold some number of watermelons,
and you want a label next to it that says "Number of watermelons",
then you should use this method to create that label
so that it will be formatted consistently with the rest of the framework.
If you're making a whole bunch of these,
you might consider using a JKeyValuePanel to do the job for you.
label - the text of the labelJLabel properly formatted to label a field