0% found this document useful (0 votes)
10 views10 pages

Deposit

Uploaded by

keshavsha8c2
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views10 pages

Deposit

Uploaded by

keshavsha8c2
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

Deposit.

java

package ASimulatorSystem;

import java.awt.*;

import java.awt.event.*;

import javax.swing.;

import java.util.;

public class Deposit extends JFrame implements ActionListener {

JTextField 11,12;

JButton b1,b2,b3;

JLabel 11,12,13;

String pin;

Deposit(String pin){

this.pin pin;

ImageIcon il = new
ImageIcon(ClassLoader.getSystemResource("ASimulatorSystem/icons/atm.
jpg")); Image i2=il.getImage().getScaledInstance(1000, 1180,
Image.SCALE_DEFAULT); Imagelcon 13= new Imagelcon(12); JLabel 13
new JLabel(13); 13.setBounds(0, 0, 960, 1080);
add(13);

11=new JLabel("ENTER AMOUNT YOU WANT TO DEPOSIT");

11.setForeground(Color. WHITE);

11.setFont(new Font("System", Font.BOLD, 16));

t1=new JTextField();

11.setFont(new Font("Raleway", Font.BOLD, 22));

B1=new JButton("DEPOSIT);

b2= new JButton("BACK");

setLayout(null);

11.setBounds(190,350,400,35);

13.add(11);

11.setBounds(190,420,320,25);

13.add(t1);

bl.setBounds(390,588,150,35);

13.add(b1);

b2.setBounds(390,633,150,35);

13.add(b2);

bl.addActionListener(this);

b2.addActionListener(this);

setSize(960,1080);
setUndecorated(true);

setLocation(500,0);

setVisible(true);

public void actionPerformed(ActionEvent ae) {

try{

String amount=tl.getText();

Date date new Date();

if(ae.getSource()==b1){

if(tl.getText().equals("")){

JOptionPane.showMessageDialog(null, "Please enter the Amount to you


want to Deposit");

}else{

Conn cl = new Conn();

c1.s.executeUpdate("insert into bank values("+pin+"", ""+date+"",


"Deposit', ""+amount+"y");

JOptionPane.showMessageDialog(null, "Rs. "+amount " Deposited


Successfully"); setVisible(false);

new Transactions(pin).setVisible(true);

} Jelse if(ae.getSource()==h2){

setVisible(false);

new Transactions(pin).setVisible(true);

}catch(Exception e) {

e.printStackTrace();

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

new Deposit("").setVisible(true);

Signup.java

package ASimulatorSystem;

import java.awt.*;

import java.awt.event.*;

import javax.swing.*;

import java.sql.*;

import com.toedter.calendar JDateChooser;

import java.util.*;

public class Signup extends JFrame implements ActionListener{

JLabel 11,12,13,14,15,16,17,18,19,110,111,112,113,114,115;

JTextField 11,12,13,14,15,16,17;

JRadioButton rl.r2,13,14,15;

JButton b;

JDateChooser dateChooser;

Random ran =new Random();

long first4= (ran.nextLong()% 9000L)+ 1000L;


String first=""+ Math.abs(first4);

Signup(){

setTitle("NEW ACCOUNT APPLICATION FORM");

ImageIcon il= new


ImageIcon(ClassLoader.getSystemResource("ASimulatorSystem/icons/logo
.jpg")); Image i2=il.getImage().getScaledInstance(100, 100, Image SCALE
DEFAULT);

ImageIcon 13=new ImageIcon(12);

JLabel 111 =new JLabel(13); 111.setBounds(20, 0, 100, 100); add(111);

11=new JLabel("APPLICATION FORM NO, "-first);

11.setFont(new Font("Raleway", Font.BOLD, 38));

12=new JLabel("Page 1: Personal Details");

12.setFont(new Font("Raleway", Font. BOLD, 22));

13= new JLabel("Name:");

13.setFont(new Font("Raleway", Font.BOLD, 20));

14=new JLabel("Father's Name:");

14.setFont(new Font("Raleway", Font. BOLD, 20));

15= new JLabel("Date of Birth:");

15.setFont(new Font("Raleway", Font. BOLD, 20));


16 =new JLabel("Gender:");

16.setFont(new Font("Raleway", Font. BOLD, 20));

17=new JLabel("Email Address:");

17.setFont(new Font("Raleway", Font.BOLD, 20));

18=new JLabel("Marital Status:");

18.setFont(new Font("Raleway", Font. BOLD, 20));

19=new JLabel("Address:"); 19.setFont(new Font("Raleway", Font. BOLD,


20));

110=new JLabel("City:");

110.setFont(new Font("Raleway", Font.BOLD, 20));

111=new JLabel("Pin Code:");

111.setFont(new Font("Raleway", Font.BOLD, 20));

112= new JLabel("State:");

112.setFont(new Font("Raleway", Font.BOLD, 20));

113=new JLabel("Date");

113.setFont(new Font("Raleway", Font.BOLD, 14));

114 new JLabel("Month");

114.setFont(new Font("Raleway", Font.BOLD, 14));

115 new JLabel("Year");

115.setFont(new Font("Raleway", Font. BOLD, 14));


t1= new JTextField();

11.setFont(new Font("Raleway", Font.BOLD, 14));

12 new JTextField();

12.setFont(new Font("Raleway", Font.BOLD, 14));

13= new JTextField();

13.setFont(new Font("Raleway". Font.BOLD, 14));

14= new JTextField();

14.setFont(new Font("Raleway". Font.BOLD, 14));

15=new JTextField();

15.setFont(new Font("Raleway", Font.BOLD, 14));

16= new JTextField();

16.setFont(new Font("Raleway", Font.BOLD, 14));

17 new JTextField();

17.setFont(new Font("Raleway", Font.BOLD, 14));

b new JButton("Next");

b.setFont(new Font("Raleway", Font.BOLD, 14));

b.setBackground(Color.BLACK); b.setForeground(Color.WHITE);

r1=new JRadioButton("Male"); r1.setFont(new Font("Raleway", Font. BOLD,


14)); rl.setBackground(Color. WHITE);

r2=new JRadioButton("Female"); r2.setFont(new Font("Raleway", Font.


BOLD. 14)); 12.setBackground(Color. WHITE);
ButtonGroup groupgender new ButtonGroup():

groupgender.add(r1); groupgender.add(r2);

r3new JRadioButton("Married");

13.setFont(new Font("Raleway", Font. BOLD, 14));

r3.setBackground(Color. WHITE);

r4new JRadioButton("Unmarried");

r4.setFont(new Font("Raleway", Font.BOLD, 14));

r4.setBackground(Color. WHITE);

r5new JRadioButton("Other");

r5.setFont(new Font("Raleway", Font. BOLD, 14));

r5.setBackground(Color. WHITE);

ButtonGroup groupstatus new ButtonGroup();

groupstatus.add(r3);

groupstatus.add(r4);

groupstatus.add(r5);

dateChooser=new DateChooser();

//dateChooser.setBorder(new LineBorder(new Color(0, 0, 0), 1, true));

dateChooser.setForeground(new Color(105, 105, 105));

dateChooser.setBounds(137, 337, 200, 29); add(dateChooser);

setLayout(null);

11.setBounds(140,20,600,40); add(11);

12.setBounds(290,80,600,30);
add(12);

13.setBounds(100,140,100,30);

add(13);

11.setBounds(300,140,400,30);

add(11);

14.setBounds(100,190,200,30);

add(14);

t2.setBounds(300,190,400,30); add(12);

15.setBounds(100,240,200,30); add(15);

dateChooser.setBounds(300, 240, 400, 30),

16.setBounds(100,290,200,30); add(16);

r1.setBounds(300,290,60,30); add(r1).

r2.setBounds(450,290,90,30); add(r2);

17.setBounds(100,340,200,30); add(17):

13.setBounds(300,340,400,30); add(13);

18.setBounds(100,390,200,30); add(18);

r3.setBounds(300,390,100,30); add(r31:
14.setBounds(450,390,100,30); add(r4);

15.setBounds(635,390,100,30); add(r5);

19.setBounds(100,440,200,30); add(19);

14.setBounds(300,440,400,30); add(14);

110.setBounds(100.490,200,30);

add(110);

15.setBounds(300,490,400,30);

add(15);

You might also like