TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Java - Key Event Concept
Senthilvelan Sambamoorthy
Aug 20
2016
Code
585
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
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