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

Question on GUI

 
Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As per the instructions:-


The user should be able to select the origin and destination of flights, and the display should update to show only flights that satisfy those criteria. The user must be able to describe enter the string value "any" for the origin, destination, or both, so as to implement a wildcard-like feature.


Is it advisable to use comboboxes for the origin and destination fields. I am currently using textfields for origin and destination. In this case the user is expected to type in the airport name. Is this OK? I mean I have seen people using comboboxes. But the instructions say that user MUST be able to describe enter....(what does describe enter here means?)...if using comboboxes u can only select but not type..AM I missing any thing here...
Or should I use Editable JComboBox???
Thanks.
[ September 01, 2002: Message edited by: Samual Harvey ]
 
Ranch Hand
Posts: 301
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I used combo boxes and received a good score... I missed 1 point on my GUI and they dont tell you why . Anyway, it is definitely easier to use combo boxes because you know what the values are and can easily check against those values. A textfield could be anything... I also added an "any" choice to the top of the combo for the wildcard requirement.
Hope that helps,
 
Ranch Hand
Posts: 3451
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I did what Nate did and got perfect on the GUI so you won't lose points for using combo boxes. And it's just good user interface design to use combo boxes if you already know all the possible choices.

Michael Morris
 
Ranch Hand
Posts: 194
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks you for your information (I've also been wondering how to do it).
 
Samual Harvey
Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes I have implemented the Jcomboboxes in editable mode.
I have a question. I am trying to bring in the sorted and unique list of origin and destination. Any ideas how should I do this. I have a vector source for my combo boxes.
I tried using HashSet but it does not work correctly. It removes some duplicates but not all. Is there origin/destination data in db.db different?
Thanks.
 
Nate Johnson
Ranch Hand
Posts: 301
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Samual Harvey:
[QB]I have a question. I am trying to bring in the sorted and unique list of origin and destination. Any ideas how should I do this. I have a vector source for my combo boxes.
I tried using HashSet but it does not work correctly. It removes some duplicates but not all.[QB]


I used a TreeSet to get my values for the combo box... it is sorted and a set so I get unique and sorted values. I just walked through the values of the db and tried to add every one, and since it was a set, it rejected duplicates... not the most elegant solution, but Sun did not seem to care
 
Michael Morris
Ranch Hand
Posts: 3451
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Originally posted by Nate Johnson:
I used a TreeSet...


Now I know you copied off my paper!
Michael Morris
 
Samual Harvey
Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yep I tried TreeSet and it works like charm.
 
permaculture is largely about replacing oil with people. And one tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic