So I\'ve been programming in java for a semester or so, and I\'ve had this problem a few times and finally got around to asking.
If I make a JFrame and
JFrame
On OS X, you need to take into account existing window decorations. They add 22 pixels to the height. So on a JFrame, you need to tell the program this:
frame.setSize(width, height + 22);