One thing I attempted is to simply call setSelected(false) from within the menuSelected(...) method, but this has side effects. For one, the menu doesn't appear to be selected, and for another, it doesn't work all the time.
One possible solution that does work is to deselect the menu in a Swing Timer. Something like:
Interesting approach... more work to do I'd have to use Timer... I'll try and I'll give a feedback. Thanks.
Sorry... didn't work either. But there might be a solution... They didn't make available such Event without thinking how-to work around this issue.
@LucDaher: It works fine for me in my test program. If it didn't work for you, then you should create a small compilable and runnable test program that shows this, and also allows us to see and experience your necessary conditions.
I discovery what is the problem and, perhaps, it has worked for you because you might use any Microsoft Windows OS (or some OS different than Linus with Gnome GTK+ as Window Manager). I've forgot to mention that the underlying OS where my test environment lies is Ubuntu and I'm using Gnome GTK+ as my default Look And Feel. As soon I've tested over my guest WinXP virtualbox and set the L&F as "Window", using your suggestion (or simply exitMenu.setSelected(false)) , it worked flawlessly. Note: I tried with Metal L&F on the WinXP and it's not worked as well, only with Window (or Classic) L&F.