Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

GUI Enhancement/Cleanup question

Aruna Raghavan
Ranch Hand
Posts: 194
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I am thinking about cleaning up my gui a bit-
I had originally coded my View such that if the actionPerformed is due to Search/Purchase button being clicked, my Controller would get the event rather than the View. However, now my Controller is doing some validation on some of the fields such as "number of tickets", is a row of flights selected before the user pushed the purchase button etc.
I am thinking about moving this action handling back into my View. After the view is done validating the input data, it can fire a FlightEvent to notify the controller. In other words, the Controller will register itself as a FlightEvent listener rather than an ActionListener. Controller will just do the work of calling methods on the DataModel as usually.

I would like to know what you think about this approach, thanks.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic