• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

MVC

 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Fred Barnes
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Guys,
One last question:
If my table model extends AbstractTableModel and I also would like to extends Observable?
Regards
Fred
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
#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
 
Fred Barnes
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Mark,
Thank you for your reply!
Regards
Fred
 
BWA HA HA HA HA HA HA! Tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic