The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes A question about Frame 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 "A question about Frame" Watch "A question about Frame" New topic

A question about Frame

Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Hi,would you please tell me: where should we use to position a Button within an application Frame,so that the width of the Button is affected by the Frame size but the height is not.
Thanks for your time.
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Using the border layout manager (a frame's default layout manager), put the button in either the north or south areas. Read up on layout managers, and it'll be clear.
Carl Trusiak

Joined: Jun 13, 2000
Posts: 3340
The default layout manager for a frame is Border Layout, To acieve this you would add the button to the north or south positions.

I Hope This Helps
Carl Trusiak, SCJP2, SCWCD
I agree. Here's the link:
subject: A question about Frame
It's not a secret anymore!