I am able to populate the table with flight data but now I intend to add a checkbox in the last column for the user to select a particular flight.
Now my code doesn't work and I am getting ArrayIndexOutOfBoundsException. I am not able to resolve this bug for long.
String[] columnTitles = { "Flight #" , "Origin Airport" , "Destination Airport" , "Carrier #" , "Price" , "Day" , "Time" , "Duration" , "Available Seats" , "Select" };
DataInfo[] info = client.getInitialFlightInformation(count);
for ( int i = 0; i < info.length; i++ ) {
if ( info[i] != null ) {
dataEntries[i] = info[i].getValues();
for ( int j = 0; j < len-1; j++ ) {
table.setValueAt( dataEntries[i][j] , i, j );
} // end of for
table.setValueAt( new Boolean(false), i, len-1 );
} // end of if
} // end of for clause
Thanks
Ravi