Class InfoDialog

All Implemented Interfaces:
ActionListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible

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
See Also:
  • Field Details

  • 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).
      Specified by:
      actionPerformed in interface ActionListener
    • center

      public void center()
      Centers the dialog on screen.