-
Notifications
You must be signed in to change notification settings - Fork 2
/
Symmetric.java
137 lines (110 loc) · 2.78 KB
/
Symmetric.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
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
package FirstProject;
import java.awt.*;
import java.awt.event.*;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import FirstProject.Design.close;
public class Symmetric implements ItemListener, ActionListener
{
Checkbox b1,b2,b3;
Label l;
JFrame f;
JButton b11;
Symmetric()
{
f=new JFrame();
f.setContentPane(new JLabel(new ImageIcon("D:\\ead.jpg")));
l=new Label (" ENHANCED SECURITY USING ENCRYPTION AND DECRYPTION ");
l.setBounds(50,50,530,70);
f.add(l);
l.setBackground(Color.black);
Font font = new Font("Times New Roman", Font.BOLD, 16);
l.setFont(font);
l.setForeground(Color.white);
CheckboxGroup cb=new CheckboxGroup();
b1=new Checkbox(" DES ",cb,false);
b1.setBounds(200,150,100,40);
f.add(b1);
b1.setBackground(Color.orange);
Font font3=new Font("Times New Roman", Font.BOLD, 12);
b1.setFont(font3);
b1.setForeground(Color.black);
b2=new Checkbox(" TripleDES ",cb,false);
b2.setBounds(200,210,100,40);
f.add(b2);
b2.setBackground(Color.darkGray);
Font font4=new Font("Times New Roman", Font.BOLD, 12);
b2.setFont(font4);
b2.setForeground(Color.white);
b3=new Checkbox(" AES ",cb,false);
b3.setBounds(200,270,100,40);
f.add(b3);
b3.setBackground(Color.orange);
Font font5=new Font("Times New Roman", Font.BOLD, 12);
b3.setFont(font5);
b3.setForeground(Color.white);
b11=new JButton(" BACK ");
b11.setBounds(30,450,100,30);
f.add(b1);
b11.setBackground(Color.black);
f.add(b11);
Font fb4 = new Font("Algerian", Font.BOLD, 12);
b11.setFont(fb4);
b11.setForeground(Color.white);
b11.addActionListener(this);
b2.addItemListener(this);
b1.addItemListener(this);
b3.addItemListener(this);
f.setSize(800,600);
f.setLayout(null);
f.setVisible(true);
close cm=new close();
f.addWindowListener(cm);
}
public void itemStateChanged(ItemEvent e)
{
if(e.getSource()==b1)
{
f.dispose();
Des cp=new Des();
cp.setVisible(true);
}
if(e.getSource()==b2)
{
f.dispose();
TripleDes cp=new TripleDes();
cp.setVisible(true);
}
if(e.getSource()==b3)
{
f.dispose();
Aes cp=new Aes();
cp.setVisible(true);
}
}
public static void main(String args[])
{
new Symmetric();
}
class close extends WindowAdapter
{
public void windowClosing(WindowEvent e)
{
System.exit(0);
}
}
public void actionPerformed(ActionEvent a)
{
if(a.getSource()==b11)
{
f.dispose();
Design c=new Design();
c.setVisible(true);
}
}
public void setVisible(boolean b) {
// TODO Auto-generated method stub
}
}