posted 23 years ago
If you are not planning to expose the JTable to the other components in your app, then the only reasonable way to do it is to add methods in its container (panel) that update the table, which can be called by the other components.
I personally had a Client (JFrame), which contained a tabbed pane with two panels FlightSearchPanel, and FlightInfoPanel. The Client acted as the Mediator of these two and some other components. So when the search button is pressed, an anonymous ActionListener implemented in Client would perform the search, and call a method setFlights() in FlightSearchPanel, which was there delegated to the actual TableModel.
I hope I was clear enough and you got my idea... Hope this helps!!!
Benjam�n