Re: panel size vs. frame size



atilagunes@xxxxxxxxx wrote:
//
i'm writing a gui that has a main panel and includes 3 subpanels.. and
has a Menu Bar..

i'm setting size of Frame with
GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds()
function.

My screen Size is 1280 * 800 and because of Start button, it takes 1280
* 770.. its ok so far.
you know the JFrame has a title bar. and suppose that i add a MenuBar
to that JFrame. how can i measure the best size of main Panel and its
bounds. i'm using null layout

*
... in main Panel and force the subpanels to
main Panel but the X and Y values are not true. i think it shifts to
down because of title bar and menu bar. i'm trying several boundaries
for subpanels but i could not fit them onto main panel..

* Learn how to use layouts, and the problems should be fixed.

Andrew T.

.


Quantcast