File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes how to use the flowlayout manager Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "how to use the flowlayout manager" Watch "how to use the flowlayout manager" New topic

how to use the flowlayout manager

Eric Daly
Ranch Hand

Joined: Jul 11, 2006
Posts: 143
I am trying to put three different things on a window, any way I can. I don't understand how to work any of the layout managers... it seems like BorderLayout isn't even working. My goal is to get the change button at the top, the circle in the middle, and then the square at the bottom. All I see is the change button. What am I doing wrong?

got it working, I had to set the window size to be larger to display the content at the bottom (the square and its info) and also I switched to BoxLayout so it was arranged from top to bottom.

Studying for SCJP 6
Mikko Kohtamäki
Ranch Hand

Joined: Dec 13, 2008
Posts: 112
Still with help of FlowLayout you can horizontally align contents in it like:

It is sorta covered in the JavaRanch Style Guide.
subject: how to use the flowlayout manager
It's not a secret anymore!