Class YesNoDialog

    • Constructor Detail

      • YesNoDialog

        public YesNoDialog​(Frame owner,
                           Strings strings,
                           int titleIndex,
                           int questionIndex,
                           boolean includeCancel)
        Creates a new YesNoDialog object and shows it centered on the screen.
        Parameters:
        owner - the frame that owns this modal dialog
        strings - the String resources
        titleIndex - the index into the String resource of the title text
        questionIndex - the index into the String resource of the question text
        includeCancel - determines whether a third button 'Cancel' will be included
    • 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
      • getResult

        public int getResult()
        Returns one of the RESULT_xyz constants of this class.
        Returns:
        the RESULT constant of the button which the user has chosen