@Override
    public void run() 
    {   System.out.println("Input run");
        this.window.setEditable(true);

        try 
        {
            OutputStreamWriter os;
            os = new OutputStreamWriter(out);


            while (this.open) {
                System.out.println("input loop");
                
                if (this.inputRecieved) {
                    this.window.setForeground(Color.GREEN);
                    os.write(input);
                    os.flush();
                    out.flush();
                    this.inputRecieved=false;
                    this.input="";
                    //Thread.sleep(10);
                }
            }
            System.out.println("Input Done!");
        }
        catch (AsynchronousCloseException e) 
        {
            
        } catch (IOException e) {
            System.out.println(e + " input");
        } /*catch (InterruptedException ex) {
            Logger.getLogger(InputGetter.class.getName()).log(Level.SEVERE, null, ex);
        } /*catch (InterruptedException ex) {
            Logger.getLogger(InputGetter.class.getName()).log(Level.SEVERE, null, ex);
        }*/
        
    }