List of utility methods to do JOptionPane Error
void | showError(Component parent, String message) Show error message JOptionPane.showMessageDialog(parent, message, "Error", JOptionPane.ERROR_MESSAGE);
|
void | showError(Component parentComponent, Exception e) show Error StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); e.printStackTrace(pw); JOptionPane.showMessageDialog(parentComponent, sw.toString()); |
void | showError(Component where, String msg) show Error JOptionPane.showMessageDialog(where, msg, "Error", JOptionPane.ERROR_MESSAGE);
|
void | showError(Exception e) show Error ByteArrayOutputStream baos = new ByteArrayOutputStream(); PrintStream ps = new PrintStream(baos); e.printStackTrace(ps); String trace = baos.toString(); e.printStackTrace(); JOptionPane.showMessageDialog(null, trace, e.toString(), JOptionPane.ERROR_MESSAGE); |
void | showError(Exception e) show Error showError(e, "");
|
void | showError(Exception e) Show application error JOptionPane.showMessageDialog(null, e.getMessage(), "Application error", JOptionPane.ERROR_MESSAGE);
e.printStackTrace();
|
void | showError(final Component component, final String title, final String message) Shows an error dialog. if (!SwingUtilities.isEventDispatchThread()) { try { SwingUtilities.invokeAndWait(new Runnable() { @Override public void run() { showError(component, title, message); }); ... |
void | showError(final Component rootComponent, final String message, final String title) show Error JOptionPane.showMessageDialog(rootComponent, message, title, JOptionPane.ERROR_MESSAGE); |
void | showError(JComponent parent, Throwable e) show Error showError(parent, null, e); |
void | showError(JFrame owner, ImageIcon image, String title, String message, String text) show Error if (owner == null || !owner.isVisible()) { System.out.println(text); } else { final JDialog frame = new JDialog(owner, true); frame.setTitle(title); frame.setLayout(new BorderLayout()); JLabel label = new JLabel(message, image, SwingConstants.LEFT); label.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); ... |