Click here to Skip to main content
15,890,557 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi, I'm new to java and I'm using Netbeans for creating my programs. I want to create a program that do so: When a user presses " k " on his keyboard, I want jLabel1 ( a label component in netbeans ) to change its text property to " you have pressed k ".
Can you please tell me the code to do so, it would be helpful for me.
Thanks in advance.

What I have tried:

I have not tried any code as I'm new and not sure how to do this.
Posted
Updated 17-Jun-17 3:08am

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900