I have a Java Swing dialog that utilizes JXTreeTable. I need to be able to add content to the JXTreeTable periodically (say, once a minute). How do I access that JXTreeTable from another class?
I'm so used to ExtendScript/JavaScript that I want to say something like frame.JXTreeTable.contents = x to set the contents of that TreeTable. Of course, it's nowhere near this easy in Java. How can I accomplish this?
You need to make your JXTreeTable a public variable inside the class that it's in (let's say AwesomeDialog). Then you could access it through the AwesomeDialog's instance with the dot notation e.g. dialog.table
Probably check out: http://docs.oracle.com/javase/tutorial/java/javaOO/accesscontrol.html