-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNetBanking.java
More file actions
113 lines (93 loc) · 2.61 KB
/
NetBanking.java
File metadata and controls
113 lines (93 loc) · 2.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
package railwayreservation;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JDialog;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JTextField;
import javax.swing.JTextArea;
import javax.swing.JPasswordField;
import javax.swing.JButton;
public class NetBanking extends JDialog implements ActionListener {
private JTextField accno;
private JTextField cid;
private JTextField am;
private JTextField m;
private JPasswordField p;
JButton pay,cancel,home;
public NetBanking() {
getContentPane().setLayout(null);
JLabel lblNewLabel = new JLabel("Account no.");
lblNewLabel.setBounds(120, 85, 94, 14);
getContentPane().add(lblNewLabel);
JLabel lblNewLabel_1 = new JLabel("Password");
lblNewLabel_1.setBounds(120, 131, 72, 14);
getContentPane().add(lblNewLabel_1);
JLabel lblNewLabel_2 = new JLabel("Customer Id");
lblNewLabel_2.setBounds(120, 181, 94, 14);
getContentPane().add(lblNewLabel_2);
JLabel lblNewLabel_3 = new JLabel("Ammount");
lblNewLabel_3.setBounds(122, 235, 46, 14);
getContentPane().add(lblNewLabel_3);
accno = new JTextField();
accno.setBounds(242, 82, 86, 20);
getContentPane().add(accno);
accno.setColumns(10);
cid = new JTextField();
cid.setBounds(242, 178, 86, 20);
getContentPane().add(cid);
cid.setColumns(10);
am = new JTextField();
am.setBounds(242, 232, 86, 20);
getContentPane().add(am);
am.setColumns(10);
m = new JTextField();
m.setText("Rs");
m.setEditable(false);
m.setBounds(221, 232, 20, 20);
getContentPane().add(m);
m.setColumns(10);
p = new JPasswordField();
p.setBounds(242, 128, 86, 20);
getContentPane().add(p);
pay = new JButton("Payment");
pay.setBounds(102, 308, 89, 23);
getContentPane().add(pay);
cancel = new JButton("Go Back");
cancel.setBounds(239, 308, 89, 23);
getContentPane().add(cancel);
home = new JButton("Home");
home.setBounds(365, 308, 89, 23);
getContentPane().add(home);
pay.addActionListener(this);
cancel.addActionListener(this);
home.addActionListener(this);
setSize(500,400);
setVisible(true);
}
public static void main(String[] args) {
new NetBanking();
// TODO Auto-generated method stub
}
@Override
public void actionPerformed(ActionEvent e) {
Object ob=e.getSource();
if(ob==cancel)
{
new Payment();
}
else if(ob==pay)
{
JOptionPane.showMessageDialog(null,"Payment successfull");
accno.setText("");
cid.setText("");
am.setText("");
p.setText("");
}
else if(ob==home)
{
new HomePage1();
}
// TODO Auto-generated method stub
}
}