-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGuest.java
More file actions
157 lines (110 loc) · 4.49 KB
/
Guest.java
File metadata and controls
157 lines (110 loc) · 4.49 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
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.*;
public class Guest extends JFrame {
private JFrame frame;
private ImageIcon img;
private JLabel paymentAmountlLabel;
private JPanel paymentAmountpanel;
private JPanel PaymentMethodPanel;
private JButton signUp;
private JButton paymentButton;
private JComboBox PaymentComboBox;
private JComboBox fundComboBox;
private Container c ;
public static JTextField paymentAmountTextField;
private JLabel paymentMethodLabel;
private JLabel background;
private JLabel imglabel;
private String []method={"Bkash","Nagad"};
public Guest() {
c=this.getContentPane();
c.setBackground(Color.GREEN);
img=new ImageIcon(getClass().getResource("Screenshot (276).png"));
imglabel=new JLabel(img);
imglabel.setBounds(40,40,600,140);
c.add(imglabel);
paymentAmountpanel =new JPanel();
PaymentMethodPanel =new JPanel();
paymentAmountTextField = new JTextField();
PaymentComboBox= new JComboBox(method);
paymentButton = new JButton();
setDefaultCloseOperation(EXIT_ON_CLOSE);
setLayout(null);
paymentAmountpanel.setBackground(new Color(234, 250, 241));
paymentAmountpanel.setLayout(null);
paymentAmountTextField.setBackground(new Color(234, 250, 241));
paymentAmountTextField.setBorder(null);
/* donateAmountTextField.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent ae){
//Bkash c=new Bkash();
String s=donateAmountTextField.getText();
//c.my_update(s);
//Bkashpin b=new Bkashpin();
new Bkash(s).setVisible(true);
//setVisible(false);
}});
*/
paymentAmountpanel.add(paymentAmountTextField);
paymentAmountTextField.setBounds(10, 40, 390, 30);
paymentAmountlLabel=new JLabel();
paymentAmountlLabel.setBackground(Color.pink);
paymentAmountlLabel.setFont(new Font("Inter", 0, 14));
paymentAmountlLabel.setText("Payment Amount");
paymentAmountlLabel.setBackground(Color.red);
paymentAmountpanel.add(paymentAmountlLabel);
paymentAmountlLabel.setBounds(10, 10, 330, 20);
add(paymentAmountpanel);
paymentAmountpanel.setBounds(75, 313, 525, 80);
PaymentMethodPanel=new JPanel();
PaymentMethodPanel.setBackground(new Color(234, 250, 241));
PaymentMethodPanel.setLayout(null);
paymentMethodLabel=new JLabel();
paymentMethodLabel.setFont(new Font("Inter", 0, 14));
paymentMethodLabel.setText("Payment method");
PaymentMethodPanel.add(paymentMethodLabel);
paymentMethodLabel.setBounds(10, 10, 160, 18);
PaymentComboBox=new JComboBox(method);
PaymentComboBox.setBackground(new Color(234, 250, 241));
PaymentComboBox.setBorder(null);
PaymentMethodPanel.add(PaymentComboBox);
PaymentComboBox.setBounds(20, 45, 72, 20);
add(PaymentMethodPanel);
PaymentMethodPanel.setBounds(75, 410, 525, 80);
paymentButton.setFont(new Font("Inter", 1, 18));
paymentButton.setForeground(new Color(46, 204, 113));
paymentButton.setText("Payment");
paymentButton.setBorder(null);
add(paymentButton);
paymentButton.setBackground(Color.red);
paymentButton.setForeground(Color.white);
paymentButton.setBounds(360, 603, 240, 59);
paymentButton.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent ae){
String s =PaymentComboBox.getSelectedItem().toString();
if(s=="Bkash")
{
PaymentOperation b=new PaymentOperation();
b.bk();
Bkashpin p=new Bkashpin();
b.AmountNumber.setText(Guest.paymentAmountTextField.getText());
p.setVisible(true);
b.setVisible(true);
}
else if (s=="nagad")
{
PaymentOperation n=new PaymentOperation();
n.Na();
n.AmountNumber.setText(Guest.paymentAmountTextField.getText());
n.setVisible(true);
}
}});
this.setBounds(400,50,700, 750);
this.setResizable(false);
this.setVisible(true);
}
public static void main(String args[]) {
new Guest();
}
}