If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Help on KeyEvents

Okay I need help with this , My Brain thinks it's right but the keyevent compiles but doesn't do anything, I have it set , so that that code get's users keycode, Then If the item in the list box is selected and they press d, the item is removed. I can't figure out why it doesn' work.

In the book I have, It tells me to add the keyevent if I want to get that key to select the D key. Here's the entire code, I'm creating a movie database, and in The list when the user types in d it represents a delete and removes everything from the list? I can't figure it out? I've changed it since my last post but still nothing works, Any help appreciated, thanks,

// here is the section of the code, the rest of the program is there with this in it, take a look see if you see anything wrong?
// Key Events to delete
// Cannot get this part of the code to work

MenuItem Save = new MenuItem("Save", new MenuShortcut(KeyEvent.VK_S));
MenuItem Exit = new MenuItem("Exit", new MenuShortcut(KeyEvent.VK_E));
MenuItem New = new MenuItem("New", new MenuShortcut(KeyEvent.VK_N));

That's what I want it to do, I want it, so that when i select something on the list that when I press D it deletes It, Right now everything i've tried has not worked, it doesn't work And I want it to Delete items on the list

Are professor doesn't want us to work on anything in regards to applets, He wants us to work in Frames, Canvases. I fogot the reason he told us, but He said it's because it enables us to do more with java? I can't remember his explanation sorry, he said they were better t hough?