: : : Yes, you need to implement the ActionListener. This requires the actionPerformed(ActionEvent e) method, in which you can clear the text field (= set the text of the text field to an empty string). The button has a method called addActionListener() to link the ActionListener to it.
: : :
: :
: : Ok, how do i do that when my header is as follows:
: :
: : public class PetAdviceApplet extends Applet implements ItemListener
: :
: : I used the ItemListener so I could use the checkboxes as well. How do I use both checkboxes and a button. When I try to put the addActionListener() in with my button in the init() method I get an error that it cannot be applied?
: :
: : Any ideas?
: :
: : Thanks again!!!!
: :
: You can add more than 1 interface to a class:
:
: public class PetAdviceApplet extends Applet implements ItemListener, ActionListener
:
:
:
Thankyou so much! That's the only thing I've been struggling with. Thanks again! God Bless!!!