-
Notifications
You must be signed in to change notification settings - Fork 1
/
PaySuccess.java
59 lines (38 loc) · 1.3 KB
/
PaySuccess.java
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
import java.awt.Color;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.*;
public class PaySuccess extends JFrame implements ActionListener {
JLabel paysuccJLabel;
JButton finishButton;
public PaySuccess() {
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.setSize(700, 500);
this.setLocationRelativeTo(null);
this.setResizable(false);
this.setLayout(null);
finishButton = new JButton("FINISH");
finishButton.setBounds(270, 420, 140, 40);
finishButton.setFocusable(false);
finishButton.setFont(new Font("Segoe UI SemiBold",Font.PLAIN,25));
finishButton.setForeground(Color.white);
finishButton.setBackground(Color.decode("#C00000"));
this.add(finishButton);
paysuccJLabel = new JLabel();
paysuccJLabel.setIcon(new ImageIcon(getClass().getResource("Storage/Payment-success.png")));
paysuccJLabel.setBounds(0, 0, 700, 420);
this.add(paysuccJLabel);
finishButton.addActionListener(this);
}
public static void main (String [] args) {
PaySuccess p = new PaySuccess();
p.setVisible(true);
}
@Override
public void actionPerformed(ActionEvent e) {
if(e.getSource()==finishButton) {
System.exit(0);
}
}
}