@Override
    public void run() 
    {
        System.out.println("Subprocess Ouput RUN");
        try {
            
            String text ;
            int n;
            byte[] buffer;
            
            text="";
            n=0;
            buffer= new byte[9096];
            System.out.println("Ok");
            out.setEditable(true);
            while ((n = in.read(buffer)) != -1) 
            {
               // System.out.println("Loop");
                text = new String(buffer, 0, n);
                out.setForeground(c);
                out.append(text);
                
                this.out.setCaretPosition(this.out.getDocument().getLength());
                //System.out.println("Returning loop");
            }
            
            in.close();
            System.out.print("Subprocess output:\n" + text);
            /*OutputStream out = System.out;
             int n;
             byte[] buffer = new byte[4096]; 
             while ((n = in.read(buffer)) != -1) { 
             //for(int i=0; i<buffer.length; i++)
             out.write(buffer, 0, n); 
             out.flush();
             }*/
        } 
        catch (IOException e) 
        {
            System.out.println(e+" output");
        }   
    }