This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hi Guys, I have a few question about implementing MVC.
1. I have designed my GUI so that when it starts up only the origin combobox is enabled. Once the user has selected the origin airport, I enable the destination combobox only with the apropiate destination. I do the same for the carier combobox. Should events like this still go in the controller class? 2. May the view call methods on my AbstractTableModel class? 3. I have a client side facade class with all the seach and book methods. Would this be my application model class then? Regards Fred
Joined: Jun 11, 2002
Hi Guys, One last question: If my table model extends AbstractTableModel and I also would like to extends Observable? Regards Fred
#2 No, the view should not call any methods of any class, unless that class is specifically used for the Display. The way I handle the TableModel, is when I get new data I create a new instance of my TableModel with that data, then use the setModel method of the JTable. Mark