java - How to update a jTable from another neatbeans module -


the application working on uses netbeans modules, problem having have jtable in 1 module update contents module.

the module table in acts data panel, information can selected , plotted graph using jfreechart, next modules handles creation of chart, when data being put series plotted doing analysis, simple stuff average error, std etc said information displayed in jtable part of first module spoke of.

so question is, there way access jtable netbeans module , if best way go doing ?

thanks in advance.

add chosen dataset tablemodellistener tablemodel. in event handler, update dataset indicated tablemodelevent in order firedatasetchanged() implicitly. chart update automatically.

example dataset:

class mydataset extends xyseriescollection implements tablemodellistener {      @override     public void tablechanged(tablemodelevent e) {         // update dataset firedatasetchanged();     } } 

example usage:

mydataset dataset = new mydataset(); jtable table = new jtable(…); table.getmodel().addtablemodellistener(dataset); 

Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

php - joomla get content in onBeforeCompileHead function -