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

Variable Index

 o frame
The parent frame.
 o MAX_COLS
Maximum number of columns in a display window (more columns can be displayed, but with a scrollbar).
 o MAX_ROWS
Maximum number of rows in a display window (more rows can be displayed, but with a scrollbar).

Constructor Index

 o MessageDialog(Frame, String, String[])
Constructs a message dialog window.

Method Index

 o actionPerformed(ActionEvent)
Handles events associated with the "OK" button.
 o setLocation(int, int)
Sets the location of the dialog window, offsetting the given location by the parent frame's location.
 o setLocation(Point)
Sets the location of the dialog window, offsetting the given location by the parent frame's location.

Variables

 o frame
 protected Frame frame
The parent frame.

 o 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).

 o 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).

Constructors

 o 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.

Methods

 o 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
 o 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
 o 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.