-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCode
More file actions
69 lines (61 loc) · 2.04 KB
/
Copy pathCode
File metadata and controls
69 lines (61 loc) · 2.04 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
import java.awt.*;
import java.awt.event.*;
public class StudentForm1 extends Frame{
Label lblRno,lblName,lblAddr,lblQ,lblSubject;
TextField txtRno,txtName;
TextArea txtAddr;
Button btnOk,btnCancel;
Choice c1;
Checkbox chk1,chk2;
Panel p1;
public StudentForm1()
{
super("Student Entry Form");
lblRno=new Label("Enter the Roll Number:");
lblRno.setBounds(10,50,150,20);
lblName=new Label("Enter the Name:");
lblName.setBounds(10,70,150,20);
lblAddr=new Label("Enter the Address:");
lblAddr.setBounds(10,90,150,20);
lblQ=new Label("Qualification:");
lblQ.setBounds(10,200,150,20);
lblSubject=new Label("Subjects:");
lblSubject.setBounds(10,230,150,20);
txtRno=new TextField(20);
txtRno.setBounds(175,50,150,20);
txtName=new TextField(20);
txtName.setBounds(175,70,150,20);
txtAddr=new TextArea(5,4);
txtAddr.setBounds(175,90,400,100);
c1=new Choice();
c1.add("MCA");
c1.add("MCS");
c1.add("MTech");
c1.add("MBA");
c1.add("BBA");
c1.add("B.Tech");
c1.setBounds(175,200,150,20);
chk1=new Checkbox("C++");
chk1.setBounds(175,230,150,20);
chk2=new Checkbox("JAVA");
chk2.setBounds(175,260,150,20);
btnOk=new Button("OK");
btnOk.setBounds(175,300,150,20);
btnCancel=new Button("Cancel");
btnCancel.setBounds(350,300,150,20);
p1=new Panel(null);
add(p1);
p1.add(lblRno); p1.add(txtRno);
p1.add(lblName); p1.add(txtName);
p1.add(lblAddr); p1.add(txtAddr);
p1.add(lblSubject); p1.add(lblQ); p1.add(c1);
p1.add(chk1); p1.add(chk2);
p1.add(btnOk);p1.add(btnCancel);
setSize(800, 600);
setVisible(true);
p1.setBackground(Color.yellow);
}
public static void main(String[] args) {
StudentForm1 st=new StudentForm1();
}
}