Suppose you could use some form of AspectJ , but I think it might be redundant. What I would do is create a method that will print and add.
public void printAndAppend(String text) {
System.out.println(text);
textArea.append(text);
}
Then you can simply do a global find and replace for System.out.printlnand replace it withprintAndAppend
source
share