This content has been marked as final. Show 3 replies
Could you post the stacktrace? And indicate which lines of your code it is referring to?
If the NPE occured with "gui.sysOut("hello world")" - and not the output.append() line - then gui is null. You can check this using System.out.prinltn():
And, in that case, the question you asked about where gui was initialised is a good one: you need to examine your code at that point and figure out why gui didn't get a value, or got a value but was subsequently set to null.
System.out.println("gui=" + gui); gui.sysOut("hello world");