-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.java
More file actions
88 lines (61 loc) · 1.73 KB
/
Main.java
File metadata and controls
88 lines (61 loc) · 1.73 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
package thirdPhase;
import java.awt.event.*;
import javax.swing.*;
public class Main extends JFrame implements ActionListener {
private static final long serialVersionUID = 1L;
JPanel Pan = new JPanel();
JLabel First = new JLabel("Welcome to Encryption & Decryption Terminal");
JLabel Second = new JLabel("1. Encryption Terminal.");
JLabel Third = new JLabel("2. Decryption Terminal.");
JLabel Fourt = new JLabel("3. Exit.");
JButton S = new JButton("Enter");
JButton T = new JButton("Enter");
JButton F = new JButton("Exit");
Main(){
super("CRYPTOGRAPHY");
Pan.setLayout(null);
add(Pan);
setLocation(500,200);
setSize(290,220);
setResizable(false);
setVisible(true);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
Prop();
}
void Prop() {
Pan.add(First);
Pan.add(Second);
Pan.add(Third);
Pan.add(Fourt);
Pan.add(S);
Pan.add(T);
Pan.add(F);
First.setBounds(10,10,800,30);
Second.setBounds(20,70,500,25);
Third.setBounds(20,100,500,25);
Fourt.setBounds(20,130,300,25);
S.setBounds(190,70,70,25);
S.addActionListener(this);
S.setToolTipText("Enter Encryption Terminal");
T.setBounds(190,100,70,25);
T.addActionListener(this);
T.setToolTipText("Enter Decryption Terminal");
F.setBounds(190,130,70,25);
F.addActionListener(this);
F.setToolTipText("Exit E&D Terminal");
}
public static void main(String[] args) {
new Main();
}
public void actionPerformed(ActionEvent a) {
if(a.getSource() == S) {
new ET();
dispose();
}else if(a.getSource() == T) {
new DT();
dispose();
}else if(a.getSource() == F) {
dispose();
}
}
}