Hi,
Take a look at this code,
import java.applet.*;
import java.awt.event.*;
import java.awt.*;
import javax.swing.*;
public class DialogTest extends Applet implements ActionListener
{
public void init()
{
setLayout(null);
setSize(100,100);
Button b1 = new Button("Click!"

;
b1.setBounds(new Rectangle(10,10,50,20));
b1.addActionListener(this);
add(b1,null);
}
public void actionPerformed(ActionEvent e)
{
String s = e.getActionCommand();
if (s.equals("Click!"

)
JOptionPane.showMessageDialog(null,new String("Alert!!"

);
}
}
Regards,
Leon If you need additional help, you can email to me at zaoliang@hotmail.com I don't guaranty that I will be able to solve your problems but I will try my best
