Key Event..(java)

Discussion in 'Mac Programming' started by Alvinkiang, May 8, 2006.

  1. Alvinkiang macrumors newbie

    Apr 24, 2006
    How do i code a simple coding so that when i press Del on the Keyboard my Label or Button will be deleted? i nv used key Listener Before.. can anyone Help me??
  2. jtalerico macrumors 6502

    Nov 23, 2005
    I am curious if you read what you wrote after you posted it?

    Since you are new to ActionListener here is a good place to start.

    Since you are looking for once the 'Del' button is pressed I would suggest starting here at the KeyStroke Class...

    Here are a few uses of the javax.swing.KeyStroke.

    Good luck!

Share This Page