Recognizing key events in 1.4.2

J

Jenn

I would like to know what I have to do under 1.4.2 to make the
following piece of code run properly:

mainform.addKeyListener(new KeyAdapter() {
public void keyPressed(java.awt.event.KeyEvent keyEvent)
{
int keyCode = keyEvent.getKeyCode();

if (keyEvent.isControlDown()
&& (keyCode == java.awt.event.KeyEvent.VK_F6))
{
showDebugInfo();

return;
}

if (keyCode == java.awt.event.KeyEvent.VK_DELETE)
{
deleteObject();
}
}
});

All help is appreciate, prefereably via email.

Jenn Rinella
Global Project Design
 
J

Jenn

Steven J Sobol said:
What, exactly, isn't working?

Steve,

When I press Ctrl + F6 on the keyboard the dialog box that is supposed
to open up does not display. I have put system out messages e,
breakpoints, etc and I never even hit this code. It worked under
1.3.1_10.

Jenn
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top