private void inputTextPaneKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_inputTextPaneKeyPressed
        // TODO add your handling code here:
        String s = (String) sendToCombo.getSelectedItem() ;
        if(!s.equals("To All")){ 
            whisper = true;
        }
        else{
            whisper = false;
        }
        // for test
        if(evt.getKeyChar( )== '\n'&& client.getLogState()){
          //  client.send(parseInputText(inputTextPane.getText()));
//            inputText = 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