public void sendData(String Data){
        try{
            if(Data.length()>0){
                if(Data.compareTo("\r\n")==0) {
                    if(cmdline.compareToIgnoreCase("quit")==0){
                        this.removeKeyListener(kl);
                        telnet.Disconnect();
                        Data = "";
                    }
                    else{
                        cmdline = "";
                    }
                }
                else if(Data.compareTo("\b")==0){
                    cmdline = cmdline.substring(0, cmdline.length()-1);
                }
                else{
                    cmdline += Data;
                }
                telnet.SendData(Data);
            }
        }catch(LowLinkException e){
            printLayerInfo(e.toString());
        }catch(TransportLayerException e){
            printLayerInfo(e.toString());
        }catch(CommunicationException e){
            printLayerInfo(e.toString());
        }
    }