net.sourceforge.jiu.gui.awt.dialogs

Class InfoDialog

Implemented Interfaces:
ActionListener

public class InfoDialog
extends Dialog
implements ActionListener

A modal AWT dialog that displays text in a non-editable text area component (so that it can be selected and easily copied to the system's clipboard). Provides an OK button so that user can remove the dialog.
Author:
Marco Schmidt

Field Summary

private Button
ok
private TextArea
textArea

Constructor Summary

InfoDialog(Frame owner, String title, String text)
Creates an InfoDialog, a modal dialog to display a text message, centered on the desktop.

Method Summary

void
actionPerformed(ActionEvent e)
Hides (closes) this dialog if the OK button was source of the action event (e.g.
void
center()
Centers the dialog on screen.

Field Details

ok

private Button ok

textArea

private TextArea textArea

Constructor Details

InfoDialog

public InfoDialog(Frame owner,
                  String title,
                  String text)
Creates an InfoDialog, a modal dialog to display a text message, centered on the desktop.
Parameters:
owner - the Frame this dialog will belong to
title - the text that will be displayed in the title bar of the dialog
text - the message text that will be displayed in the main part of the dialog

Method Details

actionPerformed

public void actionPerformed(ActionEvent e)
Hides (closes) this dialog if the OK button was source of the action event (e.g. if the button was pressed).

center

public void center()
Centers the dialog on screen.