[java] setting client area
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]
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
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement