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:
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
Post a Comment