Skip to main content

can we add ESC to map to showPopup(false) if its popup up

1 reply [Last post]
rfwalker
Offline
Joined: 2004-09-15

Hi all, I notice once I right click on the popup and it
pops up,
there is no way to un-pop it up
unless you click a menu item

I was wondering if ESC code be mapped to

popup.setVisible(false);

thanks

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
rfwalker
Offline
Joined: 2004-09-15

I tried the obvious but to no avail in 1.4.02

popup.addKaddKeyListener(new KeyAdapter()
{
public void keyTyped(KeyEvent e)
{
if (((int) e.getKeyChar()) == KeyEvent.VK_ESCAPE)
popup.setVisible(false);
}
});