My EditableTableModel is same as FlightTableModel. Anyway , I have renamed my class as FlightTableModel and refactored the usage in the rest of the project.
class SearchFlightAction extends AbstractAction {
public SearchFlightAction(
String label) {
super(label);
}
public void actionPerformed(ActionEvent ae) {
String origin = (String)combo1.getSelectedItem();
String destination = (String)combo2.getSelectedItem();
tring carrier = (String)combo3.getSelectedItem();
String criteria = SearchCriteriaBuilder.parse(origin, destination, carrier);
DataInfo[] info = client.searchFlight(criteria.toString());
for ( int i = 0; i < info.length; i++ ) {
if ( info[i] != null ) {
dataEntries[i] = info[i].getValues();
if ( dataEntries[i][1].equals(origin) && dataEntries[i][2].equals(destination) && dataEntries[i][3].equals(carrier) ) {
for ( int j = 0; j < len; j++ ) {
table.setValueAt( dataEntries[i][j] , i, j );
} // end of for
}
} // end of if
} // end of for clause
model = new FlightTableModel(columnTitles, dataEntries);table.setModel(model); }
} // end of class
The data in the table is not yet refreshed
Ravindra