Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Alvinkiang

macrumors newbie
Original poster
Apr 24, 2006
14
0
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??
 

jtalerico

macrumors 6502
Nov 23, 2005
358
0
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!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.