JFrame client area
-
Anyone know an easy way do get the "client area" of a JFrame? I'm not using a layout manager. I need to know the size of the window *not* including the title bar. I'm writing code in the constructor of the frame. I tried getInsets, but it always returns 0's. Thanks, sbl
-
Anyone know an easy way do get the "client area" of a JFrame? I'm not using a layout manager. I need to know the size of the window *not* including the title bar. I'm writing code in the constructor of the frame. I tried getInsets, but it always returns 0's. Thanks, sbl
I don't think a container has a size or position at this point.
-
I don't think a container has a size or position at this point.
You are correct. I just had to set the size to arbitrary values (10,10,10,10) and show it. Then getinsets returned the proper info. I then just hide it, size it correctly and carry on. Thanks, sbl