This week's giveaway is in the Groovy forum.
We're giving away four copies of Groovy Fundamentals video training course and have Ken Kousen on-line!
See this thread for details.
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 Groovy Fundamentals video training course this week in the Groovy 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: 9102

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>
subject: Layout