Want to become a Vibe Coder? Join Vibe Coding Training here
x
C# Corner
Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Java - Key Event Concept
WhatsApp
Senthilvelan Sambamoorthy
Aug 20
2016
663
0
0
keybo.rar
/* keyboard event */
import
java.awt.*;
import
java.applet.*;
import
java.awt.event.*;
public
class
keybo
extends
Applet
implements
KeyListener
{
Label l;
TextField t;
public
void
init()
{
l =
new
Label(
"enter the charecter : "
);
add(l);
t =
new
TextField(
10
);
t.addKeyListener(
this
);
add(t);
}
public
void
keyPressed(KeyEvent e)
{ }
public
void
keyReleased(KeyEvent e)
{ }
public
void
keyTyped(KeyEvent e)
{
showStatus(
"the given charecter is : "
+e.getKeyChar());
}
}
/* <body>
<applet code = "keybo.class" width = 200 height = 200>
</applet>
</body> */
Java
Key Event Concept
Up Next
Java - Key Event Concept