Class MessageDialog
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Window
|
+----java.awt.Dialog
|
+----MessageDialog
- public class MessageDialog
- extends Dialog
- implements ActionListener
Class definition for a dialog to display a window with an
informational message and wait for the 'OK' button to be pressed.
- Version:
- $Revision: 1.5 $, $Date: 2000/10/30 17:04:42 $
- Author:
- John Cavanaugh
-
frame
- The parent frame.
-
MAX_COLS
- Maximum number of columns in a display window (more columns
can be displayed, but with a scrollbar).
-
MAX_ROWS
- Maximum number of rows in a display window (more rows
can be displayed, but with a scrollbar).
-
MessageDialog(Frame, String, String[])
- Constructs a message dialog window.
-
actionPerformed(ActionEvent)
- Handles events associated with the "OK" button.
-
setLocation(int, int)
- Sets the location of the dialog window, offsetting the
given location by the parent frame's location.
-
setLocation(Point)
- Sets the location of the dialog window, offsetting the
given location by the parent frame's location.
frame
protected Frame frame
- The parent frame.
MAX_ROWS
protected static final int MAX_ROWS
- Maximum number of rows in a display window (more rows
can be displayed, but with a scrollbar).
MAX_COLS
protected static final int MAX_COLS
- Maximum number of columns in a display window (more columns
can be displayed, but with a scrollbar).
MessageDialog
public MessageDialog(Frame frame,
String title,
String text[])
- Constructs a message dialog window.
- Parameters:
- frame - the parent frame.
- title - a title for the window.
- text - the text to be displayed.
setLocation
public void setLocation(Point loc)
- Sets the location of the dialog window, offsetting the
given location by the parent frame's location.
- Parameters:
- loc - The location for the window.
- Overrides:
- setLocation in class Component
setLocation
public void setLocation(int x,
int y)
- Sets the location of the dialog window, offsetting the
given location by the parent frame's location.
- Parameters:
- x - The x offset for the window.
- y - The y offset for the window.
- Overrides:
- setLocation in class Component
actionPerformed
public void actionPerformed(ActionEvent e)
- Handles events associated with the "OK" button. Provided for
ActionListener interface.
- Parameters:
- e - The event that triggered the action.