Key Event..(java)

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

  1. macrumors newbie

    Joined:
    Apr 24, 2006
    #1
    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. macrumors 6502

    Joined:
    Nov 23, 2005
    #2
    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!
     
  3. macrumors 6502a

    Palad1

    Joined:
    Feb 24, 2004
    Location:
    London, UK
    #3

Share This Page