import java.awt.Component; import javax.swing.JOptionPane; public class dialogueException extends Exception { private String strTitle = "Unknown Exception"; private int dialogueType = 0; public dialogueException () { super(); } public dialogueException (String strErr) { super(strErr); } public dialogueException (String strErr, String strTitle) { super(strErr); this.strTitle = strTitle; } public dialogueException (String strErr, String strTitle, int dialogueType) { super(strErr); this.strTitle = strTitle; this.dialogueType = dialogueType; } public void displayError () { displayError(null); } public void displayError (Component parent) { JOptionPane.showMessageDialog(parent, getMessage(), strTitle, dialogueType); } public String getTitle () { return strTitle; } }