1. You added the listener to the frame so the coordinates a relative to the frame, which included the title bar. The component is added to the content pane of the frame so the coordinates are different. Add the listener to the content pane:
2. For a component the location is the top/left and the component is painted below that point. To paint above the point you need to adjust the "Y" value:
Maneesh Godbole wrote:The proper way to build your UI is using layout managers.
The first problem i ran into was using the layout manager. It placed the JLabel on the west side of the page so I set it to null. That's why i'm not using a layout manager.
Even though they're meant to help.