import java.applet.*; import java.awt.*; import java.awt.event.*; public class tablet_events extends Applet implements ActionListener, KeyListener, TextListener { TextField textField; public void init() { setBackground(new Color(225,225, 255)); textField = new TextField(20); textField.addActionListener(this); textField.addKeyListener(this); textField.addTextListener(this); add(textField); textField.requestFocus(); } public void actionPerformed(ActionEvent ae) { System.out.println("actionPerformed: " + textField.getText()); } public void keyPressed(KeyEvent ke) { System.out.println("keyPressed: " + textField.getText()); } public void keyReleased(KeyEvent ke) { System.out.println("keyReleased: " + textField.getText()); } public void keyTyped(KeyEvent ke) { System.out.println("keyTyped: " + textField.getText()); } public void textValueChanged(TextEvent te) { System.out.println("textValueChanged: " + textField.getText()); } } // END OF Class tablet_events