Original Post
in class today i was trying to use the action listener which wasnt working properly until i added the jave.awt.event.* and the java.awt.*;. I would have thought that just importing the java.awt would make it run but it didnt. Could someone tell me how it works to add to my understanding of java? hers wat i had done... // The "EventTest" class. import java.awt.event.*; import java.awt.*; import java.applet.*; import java.lang.*; public class EventTest extends Applet implements ActionListener { // Place instance variables here Label lblDisplay = new Label (" "); TextField txtInput = new TextField (" "); Button btnDisplay = new Button ("Display"); public void init () { // Place the body of the initialization method here add (lblDisplay); add (txtInput); add (btnDisplay); btnDisplay.addActionListener (this); } // init method public void actionPerformed (ActionEvent event) { lblDisplay.setText (txtInput.getText ()); } } // EventTest class