-
Notifications
You must be signed in to change notification settings - Fork 2
/
Asymmetric.java
120 lines (96 loc) · 2.41 KB
/
Asymmetric.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
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.Symmetric.close;
public class Asymmetric implements ItemListener, ActionListener
{
Checkbox b1,b2;
Label l;
JFrame f;
JButton b11;
Asymmetric()
{
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(" RSA ",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(" DSA ",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);*/
b11=new JButton(" BACK ");
b11.setBounds(30,450,100,30);
f.add(b11);
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);
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();
Rsa cp=new Rsa();
cp.setVisible(true);
}
/*if(e.getSource()==b2)
{
f.dispose();
Dsa cp=new Dsa();
cp.setVisible(true);
}*/
}
public static void main(String args[])
{
new Asymmetric();
}
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
}
}