Hi Mark Who should set the TableModel for JTable using table.setModel(new MyTableModel()) 1) The View itself or 2) The GUI controller What i believe is that the View should not be worried abt the model. How did u handled this ??? As far as origin and destination airports are concerned, the mode selection form controller pass it to the Booking Form constructor as: obj = new BookingForm(DataInfo roigin, DatraInfo destination) obj.show()
If I were to implement the MVC PATTERN for the FBN application then I should have three components i.e FBNModel, FBNView and FBNController. I know that FBNModel encapulates data, FBNView would basically be the Frame containing the JTable and FBNController would basically be used for taking care of user actions on the front-end and transfer them to FBNModel for fetching new set of data and use this data to refresh the FBNView. Please correct me if I am wrong in interpreting the MVC pattern.