private void sendButtonActionPerformed(java.awt.event.ActionEvent evt) {
        time = Calendar.getInstance();
        timestamp = timeFormat.format(time.getTime());
        //Create a message from user details and message text
        message = new MessageObj(1, messageTextBox.getText(), timestamp, username);

        if (!(message.getMsgText().equals(""))) {
            if (annoying) {
                if (goodGrammar(message.getMsgText())) {
                    sendMessage(message);
                    messageTextBox.setText("");
                    failed = 0;
                } else {
                    JOptionPane.showMessageDialog(this, "Your spelling is not good enough, please try again");
                    failed++;
                }

            } else {
                if (autoCorrect) {
                    message.setMsgText(correct(message.getMsgText()));
                }
                sendMessage(message);
                messageTextBox.setText("");
            }
            if (failed >= 3) {
                int response = JOptionPane.showConfirmDialog(this, "You seem to have some problem with your spelling, would you like to turn on the auto correction?");
                switch (response) {
                    case 0:
                        activateAutoCorrect();
                        failed = 0;
                        break;
                    case 1:
                        failed = 0;
                        break;
                    case 2:
                        failed = 0;
                        break;
                }
            }
        }
    }