Swing on OSX: How to Trap command-Q?

Posted by yar on Stack Overflow See other posts from Stack Overflow or by yar
Published on 2010-01-13T23:47:12Z Indexed on 2010/05/21 3:10 UTC
Read the original article Hit count: 229

Filed under:
|
|

After being convinced ("schooled") that Swing apps on Mac do look native, I'm trying to make mine look as native as possible. Everything looks great, but when I hit command-Q or do it from the menu, my windowStateChanged(WindowEvent e) is not firing on my main JFrame (if I exit in any other way, it does fire). How can I respond to the real Apple quit?

© Stack Overflow or respective owner

Related posts about swing

Related posts about java