• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

GUI

 
Prakash Krishnamurthy
Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All I can think of for the GUI is something like this:
from? a list out here
to? a list out here too
a JTable out here to print out the results:

any suggestions? It does not look all that attractive like this.....any suggestions???
 
aadhi agathi
Ranch Hand
Posts: 263
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Prakash Krishnamurthy:
All I can think of for the GUI is something like this:
from? a list out here
to? a list out here too
a JTable out here to print out the results:

if it is the best GUI you are going to use at a user abstraction, once you are thr' with the design, then anything will do
 
Prakash Krishnamurthy
Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello...
I think I was not too clear..so let me re-phrase what I wrote...
My GUI does not look too fancy. Its just got the "from" and "to" and the corresponding JCombo Boxes for them. It also has the JTable to display results.....Did u guys have anything else?
I am also going back and forth on my decision to fill all the names in the combo boxes in the to and from fields by querying the databases and finding out the names(for the origin and destination).....
Sometimes, I think hard-coding it should not be a bad either, because if at all they enhance their database then a lot of things would need to change anyway....what did u guys do?
Comments please!
 
John Smith
Ranch Hand
Posts: 2937
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

My GUI does not look too fancy. Its just got the "from" and "to" and the corresponding JCombo Boxes for them. It also has the JTable to display results.....Did u guys have anything else?

How about the "Search Flights" button, the "Book Flight" button, and the "Number of seats to book" textbox, along with its JLabel? If you are doing the "on the fly" database switch, you will also have a menu item to pop up a dialog to specify database name, server port, server DNS, and a few radio buttons to indicate the connection type. Throw in a few panels and bordered group boxes to house all these components, plus an application icon, status bar, caption text, and a Help|About, and your app now looks professional.

Sometimes, I think hard-coding it should not be a bad either, because if at all they enhance their database then a lot of things would need to change anyway....what did u guys do?

That's not a good justification for hard coding the values, -- I am sure you will have points taken away for this. Consider a very obvious change, -- a new flight from a new airport is added to the database. Your app is now useless. If I were the assessor, I would fail the candidate just for this.
Eugene.
[ January 30, 2003: Message edited by: Eugene Kononov ]
 
Ben Ritchie
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've been wondering about hard-coding values. I've tried to avoid it (and have done so far), but I've hit a problem when working out the values to put in the Search JComboBoxes. As far as I can tell you've got to hard-code information about the database schema to do this - you need to know which column in the database contains the TO, FROM and CARRIER values so that you can construct a set of unique values for the ComboBox.
At the moment these column numbers are hard-coded in an interface implemented by the Facade, so I think you would only have to change this if the database was changed to add or remove columns (e.g. to add aeroplane type or whatever). Most of the rest is schema-independent (at least, I hope so!), but if there are already hard-coded values it would make the view simpler if I used them there too rather than passing column names etc. in from the model when it starts up.
Is it OK to hardcode the database schema (i.e. you could add or remove rows from the database at will, but would have to modify an interface to add or remove a new column) or should I aim at allowing the database to change at will? My JTable will already allow this, but how do I work out the ComboBox values?
 
Prakash Krishnamurthy
Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, I do realise that hard-coding anything should the last thing you wanna do....for this particular case, I plan to have a mehtod that searches for all the origin and destination points and add them to the JComboBox as unique entries(by taking out the duplicate ones)...
thanks a lot eugene..! BTW is this what u did too?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic