-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathStudentRegistration.java
More file actions
83 lines (69 loc) · 1.92 KB
/
StudentRegistration.java
File metadata and controls
83 lines (69 loc) · 1.92 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
import java.awt.*;
class StudentRegistration extends Frame
{
Button b = new Button("Save");
Label l = new Label("Student Details");
Label l1 = new Label("Name:");
Label l2 = new Label("Age:");
Label l3 = new Label("Sex(M/F):");
Label l4 = new Label("Address:");
Label l5 = new Label("Course:");
Label l6 = new Label("Semester:");
TextField t1 = new TextField();
CheckboxGroup cbg = new CheckboxGroup();
Checkbox cb1 = new Checkbox("Male",false,cbg);
Checkbox cb2 = new Checkbox("Female",false,cbg);
TextArea ta1 = new TextArea(" ",180,90,TextArea.SCROLLBARS_VERTICAL_ONLY);
Choice course = new Choice();
Choice sem = new Choice();
Choice age = new Choice();
StudentRegistration()
{
setLayout(null);
add(l);add(l1);add(l2);add(l3);add(l4);add(l5);add(l6);
add(t1);add(ta1);add(cb1);add(cb2);add(course);add(sem);add(age);add(b);
course.add("CS");
course.add("FT");
course.add("BT");
course.add("CH");
age.add("17");
age.add("18");
age.add("19");
age.add("20");
age.add("21");
age.add("22");
age.add("23");
sem.add("1");
sem.add("2");
sem.add("3");
sem.add("4");
sem.add("5");
sem.add("6");
sem.add("7");
sem.add("8");
l.setBounds(250,40,100,20);
l1.setBounds(25,65,90,20);
l2.setBounds(25,90,90,20);
l3.setBounds(25,120,90,20);
l4.setBounds(25,185,90,20);
l5.setBounds(25,260,90,20);
l6.setBounds(25,290,90,20);
t1.setBounds(120,65,170,20);
ta1.setBounds(120,180,170,60);
cb1.setBounds(120,120,50,20);
cb2.setBounds(170,120,60,20);
course.setBounds(120,260,100,20);
sem.setBounds(120,290,100,20);
age.setBounds(120,90,80,20);
b.setBounds(120,350,50,30);
setForeground(Color.red);
}
public static void main(String s[])
{
StudentRegistration sr = new StudentRegistration();
sr.setVisible(true);
sr.setSize(new Dimension(600,600));
sr.setTitle("Student Registration Form");
sr.setBackground(Color.blue);
}
}