public class Dialog_Box extends JOptionPane
JOptionPane.AccessibleJOptionPaneJComponent.AccessibleJComponentContainer.AccessibleAWTContainerComponent.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_LINE_LENGTH
The maximum number of characters per line in a dialog box.
|
CANCEL_OPTION, CLOSED_OPTION, DEFAULT_OPTION, ERROR_MESSAGE, icon, ICON_PROPERTY, INFORMATION_MESSAGE, INITIAL_SELECTION_VALUE_PROPERTY, INITIAL_VALUE_PROPERTY, initialSelectionValue, initialValue, INPUT_VALUE_PROPERTY, inputValue, message, MESSAGE_PROPERTY, MESSAGE_TYPE_PROPERTY, messageType, NO_OPTION, OK_CANCEL_OPTION, OK_OPTION, OPTION_TYPE_PROPERTY, options, OPTIONS_PROPERTY, optionType, PLAIN_MESSAGE, QUESTION_MESSAGE, SELECTION_VALUES_PROPERTY, selectionValues, UNINITIALIZED_VALUE, value, VALUE_PROPERTY, WANTS_INPUT_PROPERTY, wantsInput, WARNING_MESSAGE, YES_NO_CANCEL_OPTION, YES_NO_OPTION, YES_OPTIONaccessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWBOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH| Modifier and Type | Method and Description |
|---|---|
static int |
Check(String message)
Displays a ConfirmDialog box centered on the screen with a "Check"
title and a Yes, No and Cancel button.
|
static int |
Check(String message,
Component parent)
Displays a ConfirmDialog box with a "Check" title and a Yes, No
and Cancel button.
|
static boolean |
Confirm(String message)
Displays a ConfirmDialog box centered on the screen with a
"Confirm" title and an OK and Cancel button.
|
static boolean |
Confirm(String message,
Component parent)
Displays a ConfirmDialog box with a "Confirm" title and an OK and
Cancel button.
|
static void |
Error(String message)
Displays an ERROR_MESSAGE MessageDialog box centered on the screen,
preceeded by an audible beep, with an "Error" title and an OK
button.
|
static void |
Error(String message,
Component parent)
Displays an ERROR_MESSAGE MessageDialog box, preceeded by an
audible beep, with an "Error" title and an OK button.
|
static String |
Fit_to_Width(String string)
Fits a String to the MAX_LINE_LENGTH.
|
static String |
Fit_to_Width(String in_string,
int width)
Fits (wraps using NL sequences) a String to a given width.
|
static void |
Notice(String message)
Displays an INFORMATION_MESSAGE MessageDialog box centered on the
screen with a "Notice" title and an OK button.
|
static void |
Notice(String message,
Component parent)
Displays an INFORMATION_MESSAGE MessageDialog box with a "Notice"
title and an OK button.
|
static String |
Password(String prompt)
Displays a Password_Dialog with a password input field preceded by a
prompt.
|
static String |
Password(String prompt,
Frame parent)
Displays a Password_Dialog with a password input field preceded by
a prompt.
|
static void |
Warning(String message)
Displays a WARNING_MESSAGE MessageDialog box centered on the
screen, preceeded by an audible beep, with a "Warning" title and an
OK button.
|
static void |
Warning(String message,
Component parent)
Displays a WARNING_MESSAGE MessageDialog box, preceeded by an
audible beep, with a "Warning" title and an OK button.
|
createDialog, createDialog, createInternalFrame, getAccessibleContext, getDesktopPaneForComponent, getFrameForComponent, getIcon, getInitialSelectionValue, getInitialValue, getInputValue, getMaxCharactersPerLineCount, getMessage, getMessageType, getOptions, getOptionType, getRootFrame, getSelectionValues, getUI, getUIClassID, getValue, getWantsInput, paramString, selectInitialValue, setIcon, setInitialSelectionValue, setInitialValue, setInputValue, setMessage, setMessageType, setOptions, setOptionType, setRootFrame, setSelectionValues, setUI, setValue, setWantsInput, showConfirmDialog, showConfirmDialog, showConfirmDialog, showConfirmDialog, showInputDialog, showInputDialog, showInputDialog, showInputDialog, showInputDialog, showInputDialog, showInternalConfirmDialog, showInternalConfirmDialog, showInternalConfirmDialog, showInternalConfirmDialog, showInternalInputDialog, showInternalInputDialog, showInternalInputDialog, showInternalMessageDialog, showInternalMessageDialog, showInternalMessageDialog, showInternalOptionDialog, showMessageDialog, showMessageDialog, showMessageDialog, showOptionDialog, updateUIaddAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateadd, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTreeaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCyclepublic static int MAX_LINE_LENGTH
public static void Notice(String message, Component parent)
message - A String message that will be displayed in the
dialog box.parent - The parent Component relative to which the dialog
box will be positioned. This may be null in which case the
Dialog_Box will be centered on the display.public static void Notice(String message)
message - A String message that will be displayed in the
dialog box.public static void Warning(String message, Component parent)
message - A String message that will be displayed in the
dialog box.parent - The parent Component relative to which the dialog
box will be positioned. This may be null in which case the
Dialog_Box will be centered on the display.public static void Warning(String message)
message - A String message that will be displayed in the
dialog box.public static void Error(String message, Component parent)
message - A String message that will be displayed in the
dialog box.parent - The parent Component relative to which the dialog
box will be positioned. This may be null in which case the
Dialog_Box will be centered on the display.public static void Error(String message)
message - A String message that will be displayed in the
dialog box.public static boolean Confirm(String message, Component parent)
message - A String message that will be displayed in the
dialog box.parent - The parent Component relative to which the dialog
box will be positioned. This may be null in which case the
Dialog_Box will be centered on the display.public static boolean Confirm(String message)
message - A String message that will be displayed in the
dialog box.public static int Check(String message, Component parent)
message - A String message that will be displayed in the
dialog box.parent - The parent Component relative to which the dialog
box will be positioned. This may be null in which case the
Dialog_Box will be centered on the display.public static int Check(String message)
message - A String message that will be displayed in the
dialog box.public static String Password(String prompt, Frame parent)
prompt - The text preceding the password input field. If
null, "Password" will be used by default.parent - The parent Frame relative to which the dialog
box will be positioned. This may be null.public static String Password(String prompt)
prompt - The text preceding the password input field. If
null, "Password" will be used by default.public static String Fit_to_Width(String in_string, int width)
A NL replaces the last whitespace sequence before the width of the current line is reached. If there is no whitespace, then the NL is inserted at the width. A width <= 0 is an unlimited width.
public static String Fit_to_Width(String string)
string - The String to be fitted.Fit_to_Width(String, int)