Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes FBNS: GUI components Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "FBNS: GUI components" Watch "FBNS: GUI components" New topic
Author

FBNS: GUI components

Jonathan Gerrish
Greenhorn

Joined: Mar 25, 2003
Posts: 24
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.
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11490
    
  95

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


The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
Jonathan Gerrish
Greenhorn

Joined: Mar 25, 2003
Posts: 24
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
Marshal Commander

Joined: Mar 28, 2003
Posts: 11490
    
  95

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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: FBNS: GUI components