private void btnConnectActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnConnectActionPerformed
        if((!txtFrnd.getText().equals(""))){
            try {
                String frnIP = database.getFrndIp(txtFrnd.getText());

                switch(chat.getFriend(frnIP, txtFrnd.getText())){
                    case "yes":
                        chat.setVisible(true);
                        this.setVisible(false);
                        break;
                    case "no":
                        JOptionPane.showMessageDialog(this, "Not Available!");
                        break;
                    default:
                        txtFrnd.setText("");
                }

            } catch (SQLException ex) {
                JOptionPane.showMessageDialog(this, "User doesn't exist");
            }
        }
    }//GEN-LAST:event_btnConnectActionPerformed