ActionListener is spelt incorrectly
Nilz
-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Joseph Kimo Kreis
Sent: 08 February 2001 16:04
To: [EMAIL PROTECTED]
Subject: I am a beginner
Hello I got my java program to work if I type in java it works. If I type
in javac it work. But when I made a simple program like for a button on an
applet it says:
import java.applet.Applet;
import java.awt.*;
import java.awt.event.*;
public class clicker extends Applet implements ActionListener{
TextField text1;
Button button1;
public void init(){
text1 =new TextField(20);
add(text1);
button1 = new Button ("Click Here!");
add (button1);
button1.addActionListner(this);
}
public void actionPerformed(ActionEvent event){
String msg = new String ("Welcome to Java");
if( event.getSource() == button1){
text1.setText(msg);
}
}
}
There error says:
clicker.java:15: cannot resolve symbol
symbol : method addActionListner (clicker)
location: class java.awt.Button
butto1.addActionListner(this)
^
I Don't understand what that means I got this example out of a book "Java 2
Complete." Does this book suck?
If you know how to solve my problem can you help. And can you point me in
the right direction for book that I need to get.
Thank you
~
~~
~~~
****************************************************************************
***
Joseph Kimo Kreis
Web Developer for MS&E Department
Terman Engineering Center
Stanford University
Stanford, CA 94305-4026
mailto:[EMAIL PROTECTED]
****************************************************************************
****
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets