i have this error..can anyone help me with this..
here is the code..
import java.applet.*;
import java.awt.*;
public class DialogBox
{
private static Dialog d;
public static void main(String args[])
{
Frame window = new Frame();
// Create a modal dialog
d = new Dialog(window, "Alert", true);
// Use a flow layout
d.setLayout( new FlowLayout() );
// Create an OK button
Button ok = new Button ("OK");
ok.addActionListener(new ActionListener()
{
public void actionPerformed( ActionEvent e )
{
// Hide dialog
DialogBox.d.setVisible(false);
}
});
d.add( new Label ("Click OK to continue"));
d.add( ok );
// Show dialog
d.pack();
d.setVisible(true);
System.exit(0);
}
}
here is the error
symbol : class ActionListener
location: class DialogBox
ok.addActionListener(new ActionListener()
^