• 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

FBNS: GUI components

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, on the FAQ page, it speculates that because of the mention of the criteriaSearch() method, and the example of carrier="SpeedyAir", that a safe bet is to expose a carrier search field on the GUI.

On my GUI, I have, a Panel at the top, with OriginAirport & DestinationAirport and a Button for search, below this, I have the JTable, and at the bottom, another panel with a spinner for number of seats (to prevent the user selecting an invalid number) and a book button.

I'd like to know if anyone has done it this way without being penalised?

Many thanks, Jonathan.
 
author and jackaroo
Posts: 12200
280
Mac IntelliJ IDE Firefox Browser Oracle C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Jonathan,

Many people have passed with only the origin and destination fields searchable.

I have not heard of anybody using a spinner on the same frame as the search and select panels, although I have heard of candidates using the spinner in dialog boxes successfully. Just out of curiosity, do you reajust the maximum for the spinner based on the line selected?

Regards, Andrew
 
Jonathan Gerrish
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Andrew, yes I have a ListSelectionListener registered for changes in the selection of the JTable, this disables booking components for flights with no seats available, and restricts the maximum number to the number of seats available on others.

I just figured a spinner limits the possibility of the entry of invalid values, therefore I need less validation code. I only use popups for error messages.

Other question, should I include a menu bar (File -> Exit) and maybe a help popup window, or can I just include the help as an html file for example.

Thanks, Jonathan.
 
Andrew Monkhouse
author and jackaroo
Posts: 12200
280
Mac IntelliJ IDE Firefox Browser Oracle C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Jonathan,

Other question, should I include a menu bar (File -> Exit) and maybe a help popup window, or can I just include the help as an html file for example.

The menu bar (and toolbar) are fairly standard options in most applications these days, so in my opinion they should be included.

As for the help file - all you must to do according to the instructions is to have it available - you are not even required to use HTML for it. However if you do create it as a HTML file, it is very easy to display it in a JEditorPane complete with hyperlink support.

Regards, Andrew
 
It's just a flesh wound! Or a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic