-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdepositt.java
More file actions
181 lines (150 loc) · 5.38 KB
/
Copy pathdepositt.java
File metadata and controls
181 lines (150 loc) · 5.38 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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.EventQueue;
import java.awt.Font;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JSeparator;
import javax.swing.JTextField;
import javax.swing.SwingConstants;
import javax.swing.JOptionPane;
import javax.swing.border.EmptyBorder;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
public class depositt extends JFrame {
static String amount,cust_nm,acc_no,tamt,full_nm;
private JPanel contentPane;
Loginfv2 L1 = new Loginfv2();
/**
* Launch the application.
*/
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
depositt frame = new depositt();
frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
}
});
}
/**
* Create the frame.
*/
public depositt() {
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setBounds(200, 100, 700, 550);
contentPane = new JPanel();
contentPane.setBackground(Color.WHITE);
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
setContentPane(contentPane);
contentPane.setLayout(null);
JLabel lblCheckBalance = new JLabel("DEPOSIT DETAILS");
lblCheckBalance.setFont(new Font("Tahoma", Font.BOLD, 18));
lblCheckBalance.setHorizontalAlignment(SwingConstants.CENTER);
lblCheckBalance.setBounds(251, 48, 199, 48);
contentPane.add(lblCheckBalance);
JLabel lblTransansactionid = new JLabel("ACCOUNT HOLDER :");
lblTransansactionid.setFont(new Font("Tahoma", Font.BOLD, 13));
lblTransansactionid.setBounds(111, 120, 199, 27);
contentPane.add(lblTransansactionid);
JLabel lblTransactionName = new JLabel("ACCOUNT NO. :");
lblTransactionName.setFont(new Font("Tahoma", Font.BOLD, 13));
lblTransactionName.setBounds(111, 176, 199, 27);
contentPane.add(lblTransactionName);
JLabel lblCustomerName = new JLabel("CUSTOMER NAME :");
lblCustomerName.setFont(new Font("Tahoma", Font.BOLD, 13));
lblCustomerName.setBounds(111, 231, 199, 27);
contentPane.add(lblCustomerName);
JLabel lblTransactionAmount = new JLabel("ENTER DEPOSIT AMOUNT :");
lblTransactionAmount.setFont(new Font("Tahoma", Font.BOLD, 15));
lblTransactionAmount.setBounds(70, 316, 240, 34);
contentPane.add(lblTransactionAmount);
JTextField amt = new JTextField();
amt.setFont(new Font("Tahoma", Font.PLAIN, 13));
amt.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
String tamt=amt.getText();
}
});
amt.setBorder(null);
amt.setColumns(10);
amt.setBounds(320, 316, 279, 27);
contentPane.add(amt);
JButton btnNewButton = new JButton("BACK");
btnNewButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
dispose();
//transac_frame t2= new transac_frame(); //Comment this line
//t2.setVisible(true); //Comment this line
}
});
btnNewButton.addMouseListener(new MouseAdapter()
{
@Override
public void mouseClicked(MouseEvent e)
{
}
});
btnNewButton.setBackground(Color.WHITE);
btnNewButton.setFont(new Font("Tahoma", Font.BOLD, 16));
btnNewButton.setBounds(23, 11, 89, 41);
contentPane.add(btnNewButton);
JPanel panel = new JPanel();
panel.setBackground(Color.BLACK);
panel.setBounds(0, 473, 684, 27);
contentPane.add(panel);
JButton btnNewButton_1 = new JButton("DEPOSIT");
btnNewButton_1.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
tamt = amt.getText();
amount=tamt;
L1.flag123 = 1;
JOptionPane.showMessageDialog(null,"Deposit Successful");
dispose();
transac_frame t2= new transac_frame(); //Comment this line
t2.setVisible(true); //Comment this line
}
});
btnNewButton_1.setFont(new Font("Tahoma", Font.BOLD, 15));
btnNewButton_1.setBounds(293, 416, 112, 34);
contentPane.add(btnNewButton_1);
//------------the empty labels infront of holder name and all for connecting db---
full_nm = L1.full_nm;
acc_no = L1.acc_no;
cust_nm = L1.cust_nm;
JLabel label = new JLabel("");
label.setFont(new Font("Tahoma", Font.PLAIN, 13));
label.setBounds(320, 120, 256, 27);
contentPane.add(label);
label.setText(full_nm);
JLabel label_1 = new JLabel("");
label_1.setFont(new Font("Tahoma", Font.PLAIN, 13));
label_1.setBounds(320, 176, 256, 27);
contentPane.add(label_1);
label_1.setText(acc_no);
JLabel label_2 = new JLabel("");
label_2.setFont(new Font("Tahoma", Font.PLAIN, 13));
label_2.setBounds(320, 231, 256, 27);
contentPane.add(label_2);
label_2.setText(cust_nm);
JSeparator separator = new JSeparator();
separator.setBounds(320, 156, 256, 9);
contentPane.add(separator);
JSeparator separator_1 = new JSeparator();
separator_1.setBounds(320, 211, 256, 9);
contentPane.add(separator_1);
JSeparator separator_2 = new JSeparator();
separator_2.setBounds(320, 267, 256, 9);
contentPane.add(separator_2);
JSeparator separator_3 = new JSeparator();
separator_3.setBounds(320, 352, 256, 9);
contentPane.add(separator_3);
}
}