Right now I am using a MouseListener to see if the mouse is pressed but it doesn't register when you press outside of an JFrame I would really need it to so how do I check for mouse events outside of a JFrame?
then
JFrame
lostFocus
, you can test by using WindowFocusListenerFocus is asynchronous, then everything inside
windowGainedFocus
andwindowLostFocus
should be wrapped intoinvokeLater