-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTnx.java
More file actions
61 lines (47 loc) · 1.54 KB
/
Tnx.java
File metadata and controls
61 lines (47 loc) · 1.54 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
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public class Tnx extends JFrame {
private JLabel tn;
private JButton exit,home;
public Tnx(){
setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
setLayout(null);
home=new JButton("Home");
home.setFont(new Font("Arial",Font.BOLD,20));
home.setBounds(100,600,100,50);
home.setBackground(Color.green);
add(home);
exit=new JButton("Exit");
exit.setFont(new Font("Arial",Font.BOLD,20));
exit.setBounds(400,600,100,50);
exit.setBackground(Color.red);
add(exit);
exit.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
System.exit(0);
}
});
home.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
LoginPage f=new LoginPage();
f.setVisible(true);
setVisible(false);
}
});
tn=new JLabel("Payment Successful");
tn.setBounds(90,300,600,100);
tn.setFont(new Font("Arial",Font.BOLD,40));
add(tn);
setSize(615, 800);
setResizable(false);
setVisible(true);
setLocationRelativeTo(null);
}
public static void main(String args[]){
Tnx t=new Tnx();
}
}