public class NetUtils
extends java.lang.Object
| Constructor and Description |
|---|
NetUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
centerDialog(java.awt.Dialog dlg,
int dlgWidth,
int dlgHeight)
Center the given dialog according to its parent.
|
static void |
centerFrameOnScreen(java.awt.Frame fr)
Center the given frame on screen.
|
static javax.swing.JMenuItem |
createMenuItem(java.lang.String name,
int key,
int modifier,
java.awt.event.ActionListener a)
Create a JMenuItem.
|
static javax.swing.border.Border |
createTitleBorder(java.lang.String name)
Create a named title border.
|
public static javax.swing.JMenuItem createMenuItem(java.lang.String name,
int key,
int modifier,
java.awt.event.ActionListener a)
name - Namekey - Accelerator key ,0 for nonemodifier - Key modifier ,0 for nonea - Action listenerpublic static javax.swing.border.Border createTitleBorder(java.lang.String name)
name - Border namepublic static void centerDialog(java.awt.Dialog dlg,
int dlgWidth,
int dlgHeight)
Note: This function has been designed to work with 'heavyWeight' system dependant awt window which doesn't use a layout manager (null layout).
dlg - the dialog.dlgWidth - desired width of the JDialog content pane.dlgHeight - desired height of the JDialog content pane.public static void centerFrameOnScreen(java.awt.Frame fr)
fr - Frame to be centered.