How to set an empty JPanel to maximum size?
803515Jan 18 2012 — edited Jan 19 2012Hello!
I created class extends JFrame.
I want this maximum size so I set the minimum size as screen size:
setSize(screenWidth,screenHeight);
Now I added an empty JPanel,
and I want it to be the maximum size.
But the problem is - I don't know what is the maximum of the current size without the frame borders. I mean, after set it to maximum size (I don't know how),
I could get the width and height of the current size without the frame borders by:
frame.getContentPane().getSize();
In conclusion, I want to set an empty JPanel to maximum size and get JFrame size without the frame borders.
Thanks!