0% found this document useful (0 votes)
3 views

Java Project

Uploaded by

abhi9410799101
Copyright
© © All Rights Reserved
Available Formats
Download as ODT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Java Project

Uploaded by

abhi9410799101
Copyright
© © All Rights Reserved
Available Formats
Download as ODT, PDF, TXT or read online on Scribd
You are on page 1/ 2

login(){

//bank k liye.......................................................................
super("BANK MANAGEMENT SYSTEM");
ImageIcon i1 = new ImageIcon(ClassLoader.getSystemResource("icon/bank.png") );
Image i2 = i1.getImage().getScaledInstance(100,100, Image.SCALE_DEFAULT);
ImageIcon i3 = new ImageIcon(i2);
JLabel image = new JLabel(i3);
image.setBounds(350,10,100,100);
add(image);

//card icon k liye..................................................................


ImageIcon ii1 = new ImageIcon(ClassLoader.getSystemResource("icon/card.png"));
Image ii2 = ii1.getImage().getScaledInstance(100,100,Image.SCALE_DEFAULT);
ImageIcon ii3 = new ImageIcon(ii2);
JLabel iimage = new JLabel(ii3);
iimage.setBounds(630, 350, 100, 100);
add(iimage);
label1 = new JLabel("WELCOME TO ATM ");
label1.setForeground(null);
label1.setBounds(230,125,450,40);
label1.setFont(new Font("AvantGrade",Font.BOLD,38));
add(label1);

//card number k liye..................................................................


label2 = new JLabel("CARD NO");
label2.setFont(new Font("Ralway", Font.BOLD, 25));
label2.setForeground(Color.WHITE);
label2.setBounds(150,190,375,30);
add(label2);

//card k liye textfield..............


textfield2 = new JTextField(15);
textfield2.setForeground(null);
textfield2.setFont(new Font("Arial",Font.BOLD,14));
textfield2.setBounds(325,190,375,30);
add(textfield2);

//password k liye.......................................................................
label3 = new JLabel("pin");
label3.setFont(new Font("abhishek",Font.BOLD,25));
label3.setForeground(Color.WHITE);
label3.setBounds(150,250,375,30);
add(label3);

//pin k liye textfield................


passwordfield3 = new JPasswordField(15);
passwordfield3.setForeground(null);
passwordfield3.setFont(new Font("abhishek",Font.BOLD,14));
passwordfield3.setBounds(325,250,375,30);
add(passwordfield3);

//making a buttons......................................................................
Button1=new JButton("sign in");
Button1.setForeground(Color.white);
Button1.setBackground(Color.BLACK);
Button1.setFont(new Font("tiwari",Font.BOLD,14));
Button1.setBounds(300,300,100,30);
Button1.addActionListener(this);
add(Button1);

// Button2............................
Button2=new JButton("clear");
Button2.setForeground(Color.white);
Button2.setBackground(Color.BLACK);
Button2.setFont(new Font("tiwari",Font.BOLD,14));
Button2.setBounds(430,300,100,30);
Button2.addActionListener(this);
add(Button2);

//Button3.............................
Button3=new JButton("sign up");
Button3.setForeground(Color.white);
Button3.setBackground(Color.BLACK);
Button3.setFont(new Font("tiwari",Font.BOLD,14));
Button3.setBounds(300,350,230,30);
Button3.addActionListener(this);
add(Button3);

//background k liye.......................................................................
ImageIcon iii1 = new ImageIcon(ClassLoader.getSystemResource("icon/backbg.png"));
Image iii2 = iii1.getImage().getScaledInstance(850,480,Image.SCALE_DEFAULT);
ImageIcon iii3 = new ImageIcon(iii2);
JLabel iiimage = new JLabel(iii3);
iiimage.setBounds(0,0,850,480);
add(iiimage);

setLayout(null);
setLocation(450,200);
setSize(850,480);
setVisible(true);
}
public void actionPerformed (ActionEvent e){
try{
if(e.getSource() == Button1){

}
else if (e.getSource() == Button2) {
textfield2.setText("");
passwordfield3.setText("");
}
else if(e.getSource() == Button3){

}
}
catch(Exception E){
E.printStackTrace();

}
public static void main(String[] args) {
new login();

}
}

You might also like