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

symfony - TEST environment only: The database schema is not in sync with the current mapping file -

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -