Class ConfirmDialog

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants

public class ConfirmDialog extends JDialog
A simple yes/no confirmation dialog.
See Also:
  • Constructor Details

    • ConfirmDialog

      public ConfirmDialog(JFrame p, String title, String question)
      Creates a new dialog window that lets the user answer Yes or No, with the Yes button pre-focused
      Parameters:
      title - a title for the dialog window
      question - the text of the dialog
    • ConfirmDialog

      public ConfirmDialog(JFrame p, String title, String question, boolean includeCheckbox)
      Creates a new dialog window that lets the user answer Yes or No, with an optional checkbox to specify future behaviour, and the Yes button pre-focused
      Parameters:
      title - a title for the dialog window
      question - the text of the dialog
      includeCheckbox - whether the dialog includes a "bother me" checkbox for the user to tick
  • Method Details

    • setVisible

      public void setVisible(boolean visible)
      Overrides:
      setVisible in class Dialog
    • getAnswer

      public boolean getAnswer()
    • getShowAgain

      public boolean getShowAgain()