Swing: set JFrame content area size
Posted
by igul222
on Stack Overflow
See other posts from Stack Overflow
or by igul222
Published on 2010-03-15T23:42:18Z
Indexed on
2010/03/15
23:49 UTC
Read the original article
Hit count: 215
I'm trying to make a JFrame with a usable content area of exactly 500x500. If I do this...
public MyFrame() {
super("Hello, world!");
setSize(500,500);
}
... I get a window whose full size is 500x500, including the title bar, etc., where I really need a window whose size is something like 504x520 to account for the window border and titlebar. How can I achieve this?
© Stack Overflow or respective owner