This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes AWT Prob Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "AWT Prob" Watch "AWT Prob" New topic

AWT Prob

Tamana Joshi

Joined: May 23, 2005
Posts: 21
hi all,
i wanna put testarea and after then i wanna put 10 buttons, this can i do it?actually i m facing problem in 2 ways
1) how to put more than one panel in one frame
2)if i hav to arrange 2 layout (Border and Grid), how can i put it, like i mean how to define one layout for frame and one for panel?
please help.
thanks in advance
Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24189

You can call setLayout() on any container (a Frame, a Panel, etc) and thereby install a LayoutManager in that container. If you install one container inside another, then you get nested layouts.

For the example you've given, perhaps you could use the default BorderLayout of a Frame, and a GridLayout in a Panel, something like this:

[Jess in Action][AskingGoodQuestions]
Tamana Joshi

Joined: May 23, 2005
Posts: 21
I agree. Here's the link:
subject: AWT Prob
It's not a secret anymore!