Maha Anna & others,
I copied this code from Event handling chapter of R&H to implement enableEvents. I am creating a Button in my
Applet using MyButton. Please see below.
class MyButton extends Button
{
MyButton(
String s)
{ super(s);
enableEvents(AWTEvent.ACTION_EVENT_MASK);
}
public void processActionEvent(ActionEvent ae)
{
System.out.println("Process Event");
super.processActionEvent(ae);
}
}
I get a compilererror saying that ActionEvent is not found in
void processActionEvent(ActionEvent) - how do u implement this? Can u see anything wrong this right away?
Thanks,