Local Coordinate Spaces
I have a frame (800 by 600) with 2 panels in it, one above the other. The top panel is 800 by 550 and the bottom panel is 800 by 50. I did drawString at (0,10) in the bottom panel, hoping to see some text, but there was nothing there. I switched it so the skinny panel was on the top instead and the text appeared. I switched the panels back and tried to render the text lower (0,550) and it worked.
So I was thinking that graphics object that is sent to the paintComponent method of the panel has a coordinate system relative to the whole window instead of just the panel, except I noticed the contents of my 2 panels don't line up right. What's up? How do coordinates work in awt and swing?
Also, I changed my frame from a Frame to a JFrame in order to take advantage of the double buffering and now the big top panel has increased in size and is encroaching on my skinny bottom panel. Has anyone encountered this sort of thing before? How do I fix it?