Cleaned up SwingWindow a bit, and found why mouse event was not entirely
reliable.