Popup Menus

Hi,

I'm using a java.awt.PopupMenu. When I invoke the show() method, the popup menu appears as it should. Here's what I'd like to do: after the popup menu appears, I want the first item in the list to be highlighted. I want to do this for the sole purpose of keyboard navigation of the menu. It seems more intuitive if the first item is highlighted. The problem is that since the popup menu doesn't derive from java.awt.Component, I don't have a lot of control over it. I tried generating a down KeyEvent after showing the menu, but it didn't work. Any ideas on how to make it work?

Thanks in advance.

[626 byte] By [mwsteina] at [2007-9-19]
# 1
I haven't worked w/ AWT in quite a while. But have you considered assigning a hotkey to the menu item (where it underlines the appropriate letter). Then try sending the event for the hotkey being pressed.Regards,Nick G.
gianakas13a at 2007-7-8 > top of java,Core,Core APIs...