Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Meenachi Suppiah   on Aug 20 In Java Category.

  
Question Answered By: Chau Tran   on Aug 20

You have to import java.awt.event*
then if you have a text field for example myTextField
you have to write a kinda special code, like:

myTextField.addActionListener (
new ActionListener()
{
public void actionPerformed (ActionEvent e)

// Whatever is gonna happen here
}
);

This is the way it works, the same goes for the other
listeners, but please check the API, I might have
misspelled something.

Share: 

 

This Question has 1 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Events on Java Or get search suggestion and latest updates.


Tagged: