Originally posted by Mark Spritzler:
The AbstractTableModel is MVC to the Table. I have a separate JPanel for my JTable, and also have extended AbstractTableModel. In my JPanel, I added a method that returns a reference to the JTable, that way the one controller can ask for it, and then reset it's model with setModel.
Mark
SCJP, SCJD, SCEA 5 "Any sufficiently analyzed magic is indistinguishable from science!" Agatha Heterodyne (Girl Genius)
Originally posted by Mark Spritzler:
The other controller is the controller for the entire Client GUI. and actually the JTable is not the controller and the view, it is just the view.
The JTableModel is the model.
I have my ClientGUI class that only has the view, meaning the display. It also has some hook methods to hook controller methods to events/actions.
Mark
SCJP, SCJD, SCEA 5 "Any sufficiently analyzed magic is indistinguishable from science!" Agatha Heterodyne (Girl Genius)
Originally posted by Burk Hufnagel:
BTW I expect that you could use anonymous classes to listen for events and send them to the Controller
or implement Action object to do the same thing.
Consider Paul's rocket mass heater. |