开发者

Swing MenuEvent menuCanceled

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?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜