What is the best way to change a non-void method's parameters WITHOUT instancing a new one..
For example
then on the main constructor
and then when a method is called, in a button listener perhaps, ReadStdout() should have new parameters.
I was thinking something like,
But doesn't work..
Any help would greatly appreciated.
Thank you.
For example
class ReadStdout{ public ReadStdout(Process p, JTextArea c){ (....) } }
then on the main constructor
ReadStdout read = new ReadStdout(process, console);
and then when a method is called, in a button listener perhaps, ReadStdout() should have new parameters.
I was thinking something like,
read.ReadStdout(newprocess, newconsole);
But doesn't work..
Any help would greatly appreciated.
Thank you.