• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

FBN GUI

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi ,
I'm almost done with my FBN programming assignment and am working on the GUI. How have most of you designed the makeReservation method in the GUI? Do you display a dialog to take the number of seats to reserve or do you just edit the JTable cell directly or is there some other way?
I would appreciate any comments you would have.
With warm regards
Abhijeet
 
Ranch Hand
Posts: 240
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can someone please suggest the complexity of the gui? I mean how advanced must it be?
 
Kalichar Rangantittu
Ranch Hand
Posts: 240
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Also the requirements say that we should use a control scheme that is flexible. Could someone please let me know how they decide which parts of the search criteria to use? I mean like dest, arrival etc dynamically without hardcoding it to be those two???
 
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I built a MDI - because I wanted to experience building one. But, most everyone uses a simple SDI. It's really quite simple this way. I also used a simple input dialog box for the booking. I believe you can really get away with creating a simple GUI. One of my arguments for the MDI will be that it allows the application to be quite flexible in the event that new requirements where requested. And, any real client/server application would never use a SDI. But for the assignement most everyone is using an SDI. Also, the requirements for the application are From/to. So you only need to allow input for this. On the database side (criteriaFind) my code will find any criteria, not just from/to - it just turned out that way while I was coding. Hope this helps.
[ January 24, 2002: Message edited by: Gregory Garrison ]
 
Kalichar Rangantittu
Ranch Hand
Posts: 240
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the response Sir. I would like to avoid the option of a MDI interface as the specifications say that the main output compoenent of the app should be a jtable. I would like some suggestions if possible without too much detail:
1. Use Toolbars?
2. Menu bars?
3. Tabbed Panes?
4. Splash screen.
Thanks
 
Gregory Garrison
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No need to get fancy. Just use a SDI demonstrating a dropdown menu, dialog boxes to display messages, etc. you will need to provide some way to allow the user to input a database path and select whether it's a local or network connection. Options for this are a dialog box, additional tab or a menu or button which displays another frame. All these options are really up to you. However, a loosely coupled will probably be prefered over a tightly coupled one so I would use interfaces to communicate between objects. This is demonstrated quite well under an MDI due to interface use between JInternalFrames and the DesktopFrame. Bottom line is the interface design is really your choice and these choices are unlimited.
 
Kalichar Rangantittu
Ranch Hand
Posts: 240
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can some one tell me if I am right? The DataClient would have two contructors, one for remote and one for local access.
DataClient() - Would connect remotely.
DataClient(String databaseLocation) would connect remotely.
Is this the way to do it? Or is there a better design pattern one can apply.
 
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
Data class
DataAccess interface implements all the methods of the Data class.
DataAccessLocal implements DataAccess
DataAccessRemote implements DataAccess
DataAccessFacade takes a DataAccess class in it's constructor.
DataAccessFactory takes the arg[] string array from the client's main, determines if it should be local or remote. If remote it does an RMI lookup calls getConnection which returns a DataAccessRemote class. If it is local it creates an instance of the Data Class wraps it into the DataAccessLocal
. In both cases I pass the returned DataAccess class to the constructor of the DataAccessFacade. The factory then returns a DataAccessFacade to the client. Now the client has no idea whether it is in local or remote mode, nor does it ever need to know. I can change my DataAccess interface, Data class, DB and server with out the client ever knowing.
How that relates to what you are asking, I am not sure, as I am not sure what the DataClient class does. Is it in the Data package or the Client package?
Hope that helps
Mark
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic