List of utility methods to do JOptionPane Error
void | displayErrorMessage(Component parentComponent, String message, String windowTitle) display Error Message displayMessage(parentComponent, message, windowTitle, JOptionPane.ERROR_MESSAGE); |
void | displayErrorMessage(final Throwable throwable, final Component parentComponent) display Error Message StringWriter stackTrace = new StringWriter(); throwable.printStackTrace(new PrintWriter(stackTrace)); JTextArea textArea = new JTextArea(stackTrace.toString(), 25, 100); textArea.setEditable(false); textArea.setTabSize(4); textArea.setForeground(Color.RED); textArea.setFont(textArea.getFont().deriveFont(12f)); JOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(parentComponent), new JScrollPane(textArea), ... |
void | displayErrorMessage(String msg, Throwable t) display Error Message JOptionPane.showMessageDialog(getFrontWindow(), msg, "Database Error", JOptionPane.ERROR_MESSAGE);
|
void | displayErrors(Component parent, List display Errors StringBuilder sb = new StringBuilder(); for (String error : errors) sb.append(" - " + error + "\n"); JOptionPane.showMessageDialog(parent, sb.toString(), "Invalid Input", JOptionPane.ERROR_MESSAGE); |
void | errMsg(Component owner, String msg, Exception e) show an error message and print a stack trace to the console if in development mode (DEV_MODE = true) if (msg != null) { JOptionPane.showMessageDialog(owner, msg, ERR_TITLE, JOptionPane.ERROR_MESSAGE); if (e != null) { e.printStackTrace(); |
void | errMsg(final Component owner, final String msg, final Throwable e) show an error message and print a stack trace to the console if in development mode (DEV_MODE = true) if (e != null) { e.printStackTrace(); if (msg != null) { JOptionPane.showMessageDialog(owner, msg, ERR_TITLE, JOptionPane.ERROR_MESSAGE); |
void | errMsg(final String msg) Error message dialog SwingUtilities.invokeLater(new Runnable() { public void run() { JOptionPane.showMessageDialog(null, msg, "Error", JOptionPane.ERROR_MESSAGE); System.out.println(msg); }); |
void | errMsg(String msg) Error message dialog JOptionPane.showMessageDialog(null, msg, "Error", JOptionPane.ERROR_MESSAGE);
System.out.println(msg);
|
void | error(Component comp, String title, String message, Object[] args) Displays an error dialog box. JOptionPane.showMessageDialog(comp, message, title, JOptionPane.ERROR_MESSAGE); |
void | error(Component parent, Exception e) error e.printStackTrace(); error(parent, e.toString()); |