import java.awt.event.*;
import java.applet.*; /* */
{
public void init ()
{
addKeyListener (this);
requestFocus ();
{
str += e.getKeyChar ();
repaint (0);
{
showStatus ("Key Pressed");
{
showStatus ("Key Released");
{
g.drawString (str, 15, 15);
}}
Java program to implement keyboard events.
Reviewed by
on
September 05, 2019
Rating:
No comments: