Java Utililty Methods JOptionPane Error

List of utility methods to do JOptionPane Error

Description

The list of methods to do JOptionPane Error are organized into topic(s).

Method

voidshowErrorMessage(JFrame frame, String msg)
show Error Message
JOptionPane.showMessageDialog(frame, msg, "JavaSnoop", JOptionPane.ERROR_MESSAGE);
voidshowErrorMessage(String message)
show Error Message
showErrorMessage(message, "Error");
voidshowErrorMessage(String message, Component component)
show Error Message
JOptionPane.showMessageDialog(component, message, "Error", JOptionPane.ERROR_MESSAGE);
voidshowErrorMessage(String message, int errorCode)
show Error Message
JOptionPane.showMessageDialog(null, message + "\naaaa\naaaa\naaaa", "Fatal error",
        JOptionPane.ERROR_MESSAGE);
voidshowErrorMessage(String msg)
show Error Message
JOptionPane.showMessageDialog(null, msg);
voidshowErrorMessage(String title, String message, java.awt.Component parent)
Displays an error message using the JOptionPane#ERROR_MESSAGE variant of dialog.
JOptionPane.showMessageDialog(parent, splitIntoLines(message), title, JOptionPane.ERROR_MESSAGE);
voidshowErrorMsg(final Container parent, final String message)
show Error Msg
SwingUtilities.invokeLater(new Runnable() {
    @Override
    public void run() {
        JOptionPane.showMessageDialog(parent, message, UIManager.getString("OptionPane.messageDialogTitle"),
                JOptionPane.ERROR_MESSAGE);
});
voidshowErrorPane(String errorMessage, Exception e)
show Error Pane
JOptionPane.showMessageDialog(null, errorMessage + " " + e.toString(), "Error", JOptionPane.ERROR_MESSAGE);
voidshowErrorPanel(Component parent, String aS, Icon icon)
Shows a generic error panel
if (aS.isEmpty()) {
    aS = "There has been an error, check logging for details";
JOptionPane.showMessageDialog(parent, aS, "LOFAR Error", JOptionPane.WARNING_MESSAGE, icon);
voidshowNoMacFoundError()
When Settop mac address is not found, the method brings up a dialog that displays the error message.
JOptionPane.showMessageDialog(null, "Mac address is not present for the settop.", "No Mac address found",
        JOptionPane.ERROR_MESSAGE);