Class InfoDialog

    • Constructor Detail

      • 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 Detail

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