import javax.swing.*;
import java.awt.event.*;
public class Simplegui implements ActionListener
{
public static void main(String args[])
{
Simplegui gui=new Simplegui();
gui.go();
}
public void go()
{
JFrame frame=new JFrame();
JButton button=new JButton("save");
button.addActionListener(this);
frame.getContentPane().add(button);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOS E);
frame.setSize(1000,600);
frame.setVisible(true);
}
public void actionPerformed(ActionEvent event)
{
button.setText("press");
}
}