This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds and have James Denton on-line!
See this thread for details.
Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

More criteriaFind and JComboBoxes  RSS feed

 
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need help to interpret my assignment instructions that says:


The user interface for this assignment must satisfy the following criteria:
- ...
- ...
- 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


Even though my assignment uses "Carrier" to give an example of the criteriaFind() method, I think that the first quoted statement is pretty clear and states clearly that I only need to allow gui users to filter by origin and destination. Anyone disagree?
The example os criteriaFind reads:


For example, the following argument string would select all records describing flights by the SpeedyAir carrier that originate in San Francisco:
"Carrier='SpeedyAir',Origin='SFO'"



JComboBox:
I am using editable JComboBoxes for accepting the origin and destination airports. Located at the to of my window there is a panel (using BoxLayout +X_AXIS) containing the two comboboxes and the search button in a row like this:
Origin: [jcombobox] Dest: [jcombobox] [search]
My problem is that the width of the comboboxes are far larger than necessary (the itens have a maximum of 3 chars) and they are not resizing properly when the window is resizing. I am reluctant to use a JComboBox.setPreferredSize() or some other thing that might involve calculating pixel size of stuff.
Has anyone been through this yet? Any suggestions?
Thanks in advance
[ July 09, 2003: Message edited by: Marcos Motta ]
[ July 09, 2003: Message edited by: Marcos Motta ]
 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I had two combo boxes as well, and I would definitely NOT fix the combo size based on the size of the frame.
If the frame is too small, too bad, and the frame is very large, position the combo boxes such that their layout in the say the top most portion of the panel is always preserved.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!