• 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

comboBox vs textfield?

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Simple GUI question:
The specs says: the user should be able to select the origin and destination of flight...
1. Does it mean I need to use comboBoxes to let the user SELECT the airports, or text Fields will be OK?
2. Do I have to add other conditions, such as the carrier, or the day?
Thanks
 
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
from a user point a view, what do you prefer: a list where you can see all the flights? Or a textfield where you have to type a code that you might not know?
I did use a combobox! All real applications that I've seen uses that.
/Enrico
 
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi Leonardo ,
well i guess u must have been pretty much convinced by enrico's answer.
i'll give you one more positive aspect of using combobox. if you use a textfield. then the user is going to type his criteria find string. so u will have to do a lot of validation there. if you use a combobox, the power of generating the combobox will be in your hand.
and belive me that makes a developers life like u and me a hell lot easier
 
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i think text field is better, because in real world case, there are so many airports, the select list could easily grow very long, say, 100+ items, which is not good i guess. also, in real world case, we normally use location names instead of airport codes in such booking systems because not many people are familiar with airport codes.
the best approach might be having a textfield and a "code lookup" button. if the use knows the code, he can just type in, if not, he can click the button to fetch all the codes.
 
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Siddharth Mehrotra:
hi Leonardo ,

and belive me that makes a developers life like u and me a hell lot easier


The real answer here is that we should use what the customer (end user) specifies in the GUI design sessions. Unfortunately, we aren't given a clue to what the customer (read person who pays the bill) wants. We can use best practices and think that using a list selection box is the best answer, but if the customer wanted a text entry field, than a text entry field is what he gets.
 
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
Ditto.
Mark
 
Leonardo Wang
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks all of you guys. You give me more idea about this assignment and real things.
 
Siddharth Mehrotra
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
but still, as per the assignment and also in real world computing, i think it is a bad practioce to make a user type some cumbersome piece of string like the criteria find , or some code's (even through we might have a code lookup) and make his search.
the best solution in that case maybe that, we fetch the data in a collection and depending on the size of collection shpow up the GUI.
if the number of elemets is more like say 100, then we can post that adat on a lookup window , otherwise dump it into a combobox
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
actually there are about 9297! tree letter codes for the (important) airports around the globe.
AAAAnaa, French Polynesia
AABArrabury, Queensland, Australia
AACAl Arish, Egypt
AAEAnnaba [El Mellah], Algeria
AAFApalachicola, FL [Apalachicola Municipal Airport], USA
...
to
ZXARota [Rota Naval Station], Spain
ZXDSan Isidro, Dominican Republic
ZXESculthorpe, United Kingdom
ZYLSylhet [Osmany/Shylet], Bangladesh
ZZUMzuzu, Malawi
ZZVZanesville, OH [Zanesville Municipal Airport], USA
The funniest thing is that ANY also is a vaild airport 3lc:
ANYAnthony, KS [Anthony Municipal Airport], USA
What about that? My idea was to provide a text field (for power users) and a lookup button for ordinary users. Think the 'any' thing I'll handle with a check box (enable/disable) criterion.
Cheers, Horst!
PS. I'd benefit from that lookup thingy too, cuz my girl friend's a flight attendant and I often have to lookup where she's staying.
 
Jim Bedenbaugh
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Siddharth Mehrotra:
but still, as per the assignment and also in real world computing, i think it is a bad practioce to make a user type some cumbersome piece of string like the criteria find , or some code's (even through we might have a code lookup) and make his search.


Having worked as a developer for a major airline carrier based in Dallas, Texas, USA (can you guess who I'm talking about?), the entire set of commands are in fact all text entry. This system has been around for years.
Whatever the user wants is what we should design, IMHO. It makes no difference how hard it is for us developers - the customer (end user) rules.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic