Use Swing event instead of AWT