How do the coordinates printed differ from what you'd expect? Quickly glancing at the code I'd suspect the behavior is because the listener is added to the JFrame and not the JPanel itself, thus the...