File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Layout Manager Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Layout Manager" Watch "Layout Manager" New topic

Layout Manager

sasank manohar
Ranch Hand

Joined: Feb 14, 2008
Posts: 186
3. If a Button is placed in a Frame and when you resize the button , its height gets affected but not width . Which layout does this work?
1.a FlowLayout
2.a GridLayout
3.the center area of BorderLayout
4.the East or West area of BorderLayout
5. the North or South area of BorderLayout
Can anyone tell me the answer and explain it..
[This message has been edited by sdev (edited July 31, 2000).]
[This message has been edited by sdev (edited July 31, 2000).]

Amandeep Waraich
Ranch Hand

Joined: Jul 14, 2000
Posts: 56
Hi sdev,
I think the answer is 4th, i.e, the width of the button won't change when the size of the frame is varied, if the button is placed in the East or West portion of the BorderLayout. This is because BorderLayout honours the preferred width of a component placed in the East or West portion, and honours the height of a component placed in the North or South portion.

I agree. Here's the link:
subject: Layout Manager
jQuery in Action, 3rd edition