aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes how to set the size of of a JPanel according to the Screen Size Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "how to set the size of of a JPanel according to the Screen Size" Watch "how to set the size of of a JPanel according to the Screen Size" New topic
Author

how to set the size of of a JPanel according to the Screen Size

buntha Choudhary
Ranch Hand

Joined: Jul 03, 2009
Posts: 136

I want to set the size of a JPanel as same as the size of the Screen or Monitor.
what is the solution?
Rodrigo Bossini
Ranch Hand

Joined: Jul 03, 2009
Posts: 113
Here's a code snippet that you should use for getting the screen size:



I see wind mills
buntha Choudhary
Ranch Hand

Joined: Jul 03, 2009
Posts: 136

THANKS
Rob Camick
Ranch Hand

Joined: Jun 13, 2009
Posts: 2203
    
    7
And if you don't want the frame to cover the start bar you would use:

 
 
subject: how to set the size of of a JPanel according to the Screen Size