import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class ButtonText extends JFrame implements ActionListener {
public static void main(String[] args) {
ButtonText test = new ButtonText();
}
ButtonText( )
{
JButton mybutton1 = new JButton("Submit1");
JButton mybutton2 = new JButton("Submit2");
mybutton1.addActionListener(this);
mybutton2.addActionListener(this);
//Container contentPane = frame.getContentPane();
//contentPane.add(mybutton1);
//contentPane.add(mybutton2);
getContentPane().add(mybutton1);
getContentPane().add(mybutton2);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setLayout(new FlowLayout());
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setSize(200,100);
setVisible(true);
//System.out.println("wait");
// System.exit(0);
}
public void actionPerformed(ActionEvent e)
{
int n1,n2,n3,n4,n5,n6,n7;
n1=((int)(Math.random()*49)+1);
n2=((int)(Math.random()*49)+1);
n3=((int)(Math.random()*49)+1);
n4=((int)(Math.random()*49)+1);
n5=((int)(Math.random()*49)+1);
n6=((int)(Math.random()*49)+1);
n7=((int)(Math.random()*49)+1);
System.out.println(n1);
System.out.println(n2);
System.out.println(n3);
System.out.println(n4);
System.out.println(n5);
System.out.println(n6);
System.out.println(n7);
}
}