The setSize() method of a Frame only resizes the frame itself, not the canvas inside. Is there a way to resize a frame based on what size you want the interior to be?
I made this image to explain what I'm talking about: I used setSize(500,500);
http://oi44.tinypic.com/4uymur.jpg
I suppose I could count pixels, but that stuff is platform-dependent, and plus it's not elegant :P