import java.io.*;
import java.awt.event.*;
import java.awt.*;
import javax.swing.*;
class Casestudy extends JFrame implements ActionListener
{//making a facebook like program
JButton Login,Register;
JLabel lbl1, lbl2;
JTextField txtEmail;
JPasswordField txtPassword;
public Casestudy()
{ //setting labels button etc
super ("Casestudy2.0");
setLayout(new FlowLayout());
lbl1 = new JLabel (" Useame ");
lbl2 = new JLabel (" Password ");
txtEmail = new JTextField(10);
Login = new JButton("Login");
Register= new JButton("Register");
//this
Login.addActionListener(this);//adding listener this
Register.addActionListener(this);
Register.setBounds(2,250,100,20);
}
-
List item
public void actionPerformed(ActionEvent e){
//my code sui -
List item
} public static void main (String args []){ Casestudy use= new Casestudy();//frame size use.setSize(250,280); use.setVisible(true); use.setDefaultCloseOperation(EXIT_ON_CLOSE); }
} supposedly i want to run this program and check tha frame before working on it but its not displaying any buttons or whatsoever plss help im in pinch :(
