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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Swing - How to maximize the window? 1

Status
Not open for further replies.

DigitalOx

Programmer
Sep 29, 1998
41
US
I am trying to learn Swing, and have a lot of resources but can't seem to figure out how to send a message to my JFrame to maximize. Is there a function that does this already and still is Platform independent? Or is it more complicated, perhaps I need to to find the screen resolution and set size myself?<br>
<br>
Thanks,<br>
DigitalOx
 
Hi!<br>
<br>
If I know well (maybe) you can maximize only the JInternalFrame.<br>
The simpliest way to determine the screensize is:<br>
Dimension screenSize=Toolkit.getDefaultToolkit().getScreenSize();<br>
You can use the return Dimension value in getPreferredSize() or setSize() and setLocation() methods.<br>
<br>
Good luck. Bye, Otto.<br>

 
Thanks Otto. Yes, I did a find a maximize function for internal frames. I will try the other ideas for the JFrame.<br>
Thanks for answering at this late hour (don't what time it iswhere you are, but its 03:15 here. <br>
<br>
DigitalOx
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top