src/main/java/com/project/emailclient/MessageDialog.java
// Validate message fields and close dialog.
Validate message fields and close dialog.
Validate message fields and close dialog .
private void actionSend() {
        if (fromTextField.getText().trim().length() < 1
                || toTextField.getText().trim().length() < 1
                || subjectTextField.getText().trim().length() < 1
                || contentTextArea.getText().trim().length() < 1) {
            JOptionPane.showMessageDialog(this,
                    "One or more fields is missing.",
                    "Missing Field(s)", JOptionPane.ERROR_MESSAGE);
            return;
        }
        dispose();
    }
private void actionSend ( ) { if ( fromTextField . getText ( ) . trim ( ) . length ( ) < 1 || toTextField . getText ( ) . trim ( ) . length ( ) < 1 || subjectTextField . getText ( ) . trim ( ) . length ( ) < 1 || contentTextArea . getText ( ) . trim ( ) . length ( ) < 1 ) { JOptionPane . showMessageDialog ( this , "One or more fields is missing." , "Missing Field(s)" , JOptionPane . ERROR_MESSAGE ) ; return ; } dispose ( ) ; }
Validate message fields and close dialog.
Validate message fields and close dialog .
// Close dialog.