src/main/java/com/project/emailclient/EmailClient.java
// Show error dialog and exit afterwards if necessary.
Show error dialog and exit afterwards if necessary.
Show error dialog and exit afterwards if necessary .
private void showError(String message, boolean exit) {
        JOptionPane.showMessageDialog(this, message, "Error",
                JOptionPane.ERROR_MESSAGE);
        if (exit)
            System.exit(0);
    }
private void showError ( String message , boolean exit ) { JOptionPane . showMessageDialog ( this , message , "Error" , JOptionPane . ERROR_MESSAGE ) ; if ( exit ) System . exit ( 0 ) ; }
Show error dialog and exit afterwards if necessary.
Show error dialog and exit afterwards if necessary .