public class GUIHelper extends Object
| Modifier and Type | Field and Description |
|---|---|
static Icon |
ICON_EMPTY
Empty icon 16x16.
|
static String |
MESSAGE_TITLE
The title for message boxes.
|
static String[] |
YES_NO_OPTIONS
"Yes" and "No" Options for showOptionDialog.
|
| Constructor and Description |
|---|
GUIHelper() |
| Modifier and Type | Method and Description |
|---|---|
static void |
centerOnParentWindow(Window window,
Window parentWindow)
Center a window on another window.
|
static void |
setDefaultScrollbarUnits(JScrollPane scrollPane)
Set reasonable unit increments for a scroll pane that does not contain a
Scrollable.
|
static void |
showMessage(Component parent,
String message,
int messageType)
Show a JOptionPane message dialog.
|
static int |
showOptionDialog(Component parent,
String message,
String[] options,
int messageType)
Show a JOptionPane option dialog.
|
static void |
showURL(String urlSpec)
Show a URL in the browser
|
public static final String MESSAGE_TITLE
public static final String[] YES_NO_OPTIONS
public static final Icon ICON_EMPTY
public static int showOptionDialog(Component parent, String message, String[] options, int messageType)
parent - parent componentmessage - the message stringoptions - the array of option stringsmessageType - the message type as defined in JOptionPanepublic static void showMessage(Component parent, String message, int messageType)
parent - parent componentmessage - the message stringmessageType - the message type as defined in JOptionPanepublic static void centerOnParentWindow(Window window, Window parentWindow)
window - the window to be centered.parentWindow - the parent window on which the window is to be centered.public static void setDefaultScrollbarUnits(JScrollPane scrollPane)
scrollPane - public static void showURL(String urlSpec)
urlSpec - the URL as a string