tags:

views:

20

answers:

1

I don't understand when menuCanceled is invoked on a JMenu.

In fact when I open a menu is called menuSelected when I close a menu is called menuDeselected but never will be called menuCanceled.

Any examples?

+1  A: 

You are right that MenuListener#menuCanceled is called from JMenu#fireMenuCanceled but the latter doesn't seem to be called anywhere from Windows JDK6.

It could be there for historical reasons or some other platform LAFs, and you have to implement it anyway, so just call menuDeselected from it.

Geoffrey Zheng