Java Swing TextArea unexpected attitude -


when call method inside class, works. when call outside of class, textarea doesn't change. while string values correct.

public void printmessage(string prefix, string message) {          system.out.println(prefix + message); // works          textarea1.settext(textarea1.gettext() + prefix + " " + message + "\n"); // works if called class     } 

solved myself. there no problem code. didn't initialize instance of class properly.


Comments

Popular posts from this blog

gcc - MinGW's ld cannot perform PE operations on non PE output file -

timeout - Handshake_timeout on RabbitMQ using python and pika from remote vm -

c# - Search and Add Comment with OpenXML for Word -