My Structure of Code ( Architecture ) is as given below -
Client starts off with command line argument to decide LOCAL or REMOTE
There is an adapter implemented by classes for Local and Remote implementations - i.e., Local speaks to Data class object directly as it resides on the server side whereas Remote created an object of the Client side networking class which creates socket to communicate with the server.
The main Client class also instantiates a class ( say PanelCombo class)which delivers a Frame , 2 Combo Boxes ( populated dynamically ) and 2 buttons for "SearchFlight" and "Exit" . This class has anonymous class Action listeners for the 2 buttons. When Search flight is clicked the Origin and Destination airports are put in the
String Criteria and put in a method called "searchFlight(String criteria)" which calls the criteriaFind of the Data class.
This returns a DataInfo array which is put in the constructor of another class( say PanelJTable ) which creates the Jtable. The PanelJTable class creates a Jtable, puts it in a JscrollPane then puts it in a Jpanel and then add this Jpanel to the Frame of PanelCombo.
So on screen you see a Frame with the ComboBoxes and Buttons -- then a Jtable gets added to it in the Center.
This Jtable is refreshed by calling the constructor of the PanelJTable class each time.
PROBLEM :Everything works fine - but when I resize the window the table display goes haywire - it does not refresh automatically to display a clean table _ What could be the problem ???
I have use Abstract Table Model for the Jtable.
------------------