• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Client GUI design question

 
Jared Chapman
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • 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 ]
 
Dieskun Koper
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
Raj Nagappan
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic