How can I disable the button after i click Once ?
My program is shown below and hope someone to help me .Thank You Very Much!
import java.awt.*;
import java.awt.event.*;
public class Client {
public static void main(String[] args){
Frame f = new ClientFrame("Client");
f.setSize(150,100);
f.setVisible(true);
}
}
class ClientFrame extends Frame{
public ClientFrame(String title){
super (title);
setLayout (new FlowLayout());
Button GameStart = new Button("Start the Game");
add (GameStart);
GameStart.addActionListener(new ButtonListener());
addWindowListener(new WindowCloser());
}
}
class ButtonListener implements ActionListener {
public void actionPerformed (ActionEvent Evt){
System.out.println("Java rules!");
}
}
class WindowCloser extends WindowAdapter{
public void windowClosing (WindowEvent evt){
System.exit(0);
}
}

