• 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

Client GUI design question

 
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello all,

I have the B&S Contractors assignment.

My client GUI has 3 main parts: a search panel (top), the JTable (middle), and a booking panel (bottom). Resizing works great - the top and bottom panels only take up the necessary vertical space to fit the components, and the JTable takes all remaining vertical space.

The question is with my search panel. It consists of two JComboBox's with JLabels (one pair for name, one for location), a group of two radio buttons (so the search will either return all matching contractors, or only matching contractors that aren't booked), and a search button.

Right now, I have it laid out like this:

---------------------------------------------

---------------------------------------------

NOTE: The JRadioButtons and the JComboBox's should all line up, but I
couldn't find a setLayout(new GridBagLayout()) in the Instant UBB
Code

I used GridBagLayout on this panel, and resizing works great, but there is a whole lot of empty space to the right of these components, especially when it's resized to full screen on a high resolution. Is this a bad design? Any suggestions on how I could improve? I don't want to add a bunch of new functionality just for the sake of filling up space. Maybe put the two JComboBox's on the same line?

Thanks in advance.

[ November 22, 2004: Message edited by: Jared Chapman ]

[ November 22, 2004: Message edited by: Jared Chapman ]

[ November 22, 2004: Message edited by: Jared Chapman ]

[ November 22, 2004: Message edited by: Jared Chapman ]

[Andrew: put code between UBB [code] and [/code] tags]
[ November 22, 2004: Message edited by: Andrew Monkhouse ]
 
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Jared,

At first I had my Name and Location text fields next to each other. Then I tried to imagine how one could at a third criterion in a next version.
With three or more fields, they won't fit. I'd have to move them.
Users don't like it when fields are moved when they get a new version of a program. So I put the Location field under the Name field.
Downside is, similar to your problem, the text fields get very long when the window is maximized. But I can live with that. (And I hope my accessor too! )

Regards,
Dies
 
Jared Chapman
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The JComboBox's in my implementation remain the same size no matter how large the window is resized. This means that the larger the window is, the more empty space I have.
 
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Jared,

I used a different design which you might like to consider. I placed each selection combobox in a single horizontal line. Every search field lines up vertically with its column in the results table below. Adding a new search field is easy because you just place it above its position in the table.

Raj.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic