Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Maximising Frame Window to fit to screen 1

Status
Not open for further replies.

kohinoor2007

Programmer
Mar 21, 2007
69
0
0
DE

Hi Guys,

Iam new to Swing &about to start with my first GUI.
Had some questions to begin with.Thought of asking the experienced guys over here.

I have JFrame,as my top level container.want the frame to be maximised or fit to the screen of the computer on which it is running?.What is the best way to do it.

Also,In the content pane of the Frame,some components are to be added.

Should I use the frame's content pane or should I create a JPanel & make it,the contentpane of the frame & then add the components to the panel.What is the best way to do it?
For the panel,I intend to use the gridbaglayout.

Thanks in advance
K




 
Have a look at the javax.swing.Frame.setExtendedState(int) method.

Tim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top