Originally posted by Sartaj Syed:
I am having some problem with the following code. Please help
import java.awt.*;
import java.awt.AWTEvent;
public class TS1 extends Frame {
...
}
The compilation errors I am getting says cannot resolve symbol ActionListener. and ActionEvent
You need to import java.awt.event.*. This is not the same as the import of java.awt.AWTEvent (which, btw, is redundant since you already imported java.awt.*). So change that second import to
import java.awt.event.*;
and your code should compile (if that's the only compile error you were getting).