I try to make an ActionListener
, and it gives me a error. I have events imported, and it still doesn't work. Here is my code:
send.addActionListener(new jj);
private class jj implements ActionListener
{
public void actionPerformed (ActionEvent event)
{
}
}
It gives the 'new jj' a error, and by the class and method, it gives actionListener, and ActionEvent a error.
I need basic help in how to make a actionListener.
It appears that you are missing a ()
after your new jj
. Also and this is more of a style point your class names are better capitalized (and a little more descriptive)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.