File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Which LayoutManagers did you use? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Which LayoutManagers did you use?" Watch "Which LayoutManagers did you use?" New topic

Which LayoutManagers did you use?

Marcel van den Boer

Joined: Apr 19, 2011
Posts: 21

Hey everyone,

Today I've implemented a large portion of the client's main window. I've developed three sections of the GUI pretty much independently of each other, and used exclusively BoxLayouts inside them (which was the logical choice for my design).
I'm combining these sections in a layout that roughly looks like this:
To quickly see what it would actually look like combined, I (temporarily) used BoxLayouts again; one dividing the screen horizontally, and then another to divide the left side vertically. Al though it was initially my intention to ultimately use a more efficient LayoutManager for this, the current code is compact enough, easy to understand and it does the job well (but it does use an extra JPanel or two solely for layout purposes).

Some posts here seem to indicate that it is a bad idea to use only one type of LayoutManager in a design, but I'm questioning this as multiple managers may make my code more complex. Right now it could go either way...

So my questions to you all are these: Which LayoutManagers did you use? Has anyone stuck to a single type of LayoutManager for their main window?

Roel De Nijs

Joined: Jul 19, 2004
Posts: 8395

Using search engine with class names of a few layout managers will answer your questions e.g. thread1 and thread2

SCJA, SCJP (1.4 | 5.0 | 6.0), SCJD
Marcel van den Boer

Joined: Apr 19, 2011
Posts: 21

Yes, "thread1" solves my questions, thanks. Guess my search for "LayoutManager" was not specific enough (or too specific).
I agree. Here's the link:
subject: Which LayoutManagers did you use?
It's not a secret anymore!