[java] setting client area

Started by
1 comment, last by Rocket05 19 years, 10 months ago
Having trouble with swing/awt and window sizes... I want to set the *client area* of my window (a JFrame) to a certain size, but it seems swing takes the sizes literally and sizes the whole window to the given size, and part of the client area is taken up by borders and title bar. how can I account for this? i've been scanning the javadocs for a while now, i can't seem to fine any method to calculate what size i need to give it if i want a client area so and so big? all help is appreciated. [edited by - Rocket05 on May 30, 2004 2:42:10 PM]
"I never let schooling interfere with my education" - Mark Twain
Advertisement
Just make a JPanel, that is the size you want, using setPreferredSize(). Then add that to the JFrames content pane, pack, and show. I believe that should help. o_O
your idea worked great, thanks!
"I never let schooling interfere with my education" - Mark Twain

This topic is closed to new replies.

Advertisement