This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
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


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "A question about Frame" Watch "A question about Frame" New topic
Author

A question about Frame

Anonymous
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.
Anonymous
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
Sheriff

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
 
Consider Paul's rocket mass heater.
 
subject: A question about Frame