File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "how to use the flowlayout manager" Watch "how to use the flowlayout manager" New topic
Author

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?



[EDIT]
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:

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: how to use the flowlayout manager
 
Similar Threads
Tic Tac Toe blank board
Simple Gui Question (Head First Java)
Inheritance problem
Too many ActionEvents after button press.
painting custom components without extending jcomponent