-
Notifications
You must be signed in to change notification settings - Fork 1
/
Rules.java
96 lines (93 loc) · 2.34 KB
/
Rules.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
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
class Rules implements ActionListener
{
JOptionPane p1;
Frame f;
Panel p,p2,p3,p4;
JLabel pic,pic1,pic2;
Button conti,rules;
Label head;
GridBagLayout gl;
GridBagConstraints gbc;
String email;
//Color gre;
Rules(String se)
{
email=se;
conti=new Button("Continue");
rules=new Button("ClicK Here For Rules");
p1=new JOptionPane();
Icon image=new ImageIcon("books.jpg");
Icon image1=new ImageIcon("girl.jpg");
Icon image2=new ImageIcon("uit.jpg");
gl=new GridBagLayout();
gbc=new GridBagConstraints();
conti.addActionListener(this);
rules.addActionListener(this);
//gre=new Color(117,102,185);
p=new Panel();
p2=new Panel();
p3=new Panel();
p4=new Panel();
f=new Frame();
pic=new JLabel(image);
pic1=new JLabel(image1);
pic2=new JLabel(image2);
gbc.anchor=GridBagConstraints.SOUTHWEST;
gl.setConstraints(pic1,gbc);
gbc.anchor=GridBagConstraints.SOUTHEAST;
gl.setConstraints(pic,gbc);
Insets is=new Insets(30,30,30,30);
gbc.insets=is;
gbc.ipadx=14;
gbc.ipady=8;
gl.setConstraints(rules,gbc);
gl.setConstraints(conti,gbc);
p2.setLayout(gl);
p4.add(pic2);
p2.add(pic);
p3.setLayout(gl);
p3.add(pic1);
p.add(conti);
p.add(rules);
p.setLayout(gl);
f.add(p4,"North");
f.add(p3,"East");
f.add(p2,"West");
f.add(p,"Center");
f.setTitle("RULES BOOK");
//f.setBackground(gre);
f.setVisible(true);
f.setSize(900,600);
f.addWindowListener(new WindowAdapter()
{
public void windowClosing(WindowEvent we)
{
System.exit(0);
}
});
}
public void actionPerformed(ActionEvent e)
{
Object ob=e.getSource();
if(ob.equals(rules))
{
p1.showMessageDialog(null,"THIS IS A SIMPLE SOFTWARE FOR CONDUCTING EXAMINATION.\n"+"SPECIALLY DESIGN FOR COLLEGS N INSTITUTIONS\n"
+"YOU HAVE TO SELECT YOUR YEAR AND THE PARTICULAR EXAM WILL BE DISPLAYED.\n"+"THERE ARE FOUR OPTIONS OUT OF WHICH ONLY ONE IS CORRECT.\n"
+"MARKING SCHEME WILL DEPEND UPON THE EXAM SETTER IT WILL BE DISCLOSED TO U BEFORE THE EXAM.\n"
+"ALL THE BEST \n");
}
else if(ob.equals(conti))
{
Cheating o=new Cheating(email);
f.setVisible(false);
}
}
}
/*public static void main(String a[])
{
Rules obj=new Rules();
}
}*/