swing - Java JFrame setSize doesn`t work properly -


i making jframe size of 500x500 pixels. make blue background , add red square in right-bottom corner (490,490) (500,500).

image: http://imageshack.com/a/img913/7936/7zdxvr.png

i don't see red square on screen. switched frame not resizable resizable , if make window larger red dot there. frame size same application's window size? how can make application's window 500x500?

the frame size of entire window, including title bar required os. when drawing things in jpanel in jframe, (0, 0) coordinate in top left corner if jpanel, begins below title bar. sounds title bar taller 10 pixels, 490 y component off window, since visible height of jpanel windowheight - titlebarheight.


Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -

php - Can you use RBAC to set individual permissions for each group? -