private void inputTextPaneKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_inputTextPaneKeyPressed
        // TODO add your handling code here:
        if(evt.getKeyChar( )== '\n'&& client.getLogState()){
            String s = (String) sendToCombo.getSelectedItem() ;
            if(!s.equals("To All") ){ 
                whisper = true;
            }
            else{
                whisper = false;
            }
            //  client.send(parseInputText(inputTextPane.getText()));
            inputText = getInputText(inputTextPane);
            refreshInputPane();
            System.out.println(inputText);
            if(!inputText.equals("") ){
                showMessage();
                 if(!whisper){
                    client.sendRoomMsg(roomKey,inputText);
                 }else{
                    String receiver = (String)sendToCombo.getSelectedItem();
                    client.sendWhisper(roomKey,receiver,inputText);
                }
            }

        }
    }//GEN-LAST:event_inputTextPaneKeyPressed