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 Layout Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Layout" Watch "Layout" New topic


Kwesi Prat

Joined: Dec 02, 2003
Posts: 7
I am a beginner in java programming. I want to write a program that has 10 text fields on the left, 10 text field on the right and a "find" button between the text fields on the right and left. Which layout is best for this?
Thank you.
Jason Menard

Joined: Nov 09, 2000
Posts: 6450
I'm going to move this to the Swing / JFC / AWT forum where you stand the best chance of getting it answered.
Joe Ess

Joined: Oct 29, 2001
Posts: 9190

The Swing Tutorial chapter on Layout Managers should help you choose

[How To Ask Questions On JavaRanch]
Brian Pipa
Ranch Hand

Joined: Sep 29, 2003
Posts: 299
I would use a main panel with a horizontal boxlayout then to that add 3 things:
1) the left panel using a vertical boxlayout and 10 text fields
2) a middle panel with the find button (just about any layout)
3) the right panel using a verical boxlayout and 10 text fields
that should get you going

My Java Freeware:<br />MACCC - <a href="" target="_blank" rel="nofollow"></a><br />Nator - <a href="" target="_blank" rel="nofollow"></a>
I agree. Here's the link:
subject: Layout
It's not a secret anymore!