-
Notifications
You must be signed in to change notification settings - Fork 1
/
TestAppletControls.java
67 lines (61 loc) · 1.47 KB
/
TestAppletControls.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
import java.awt.*;
import java.applet.*;
//<applet code="TestAppletControls" width=400 height=400></applet>
public class TestAppletControls extends Applet
{
Label lname,lno,lsub,ldiv,lgender,laddr;
Button blogin;
TextField tname,tno,tdiv,tsub;
Choice cDiv;
List lSub;
Checkbox cMale,cFemale;
CheckboxGroup cGender;
TextArea taddr;
Scrollbar sb;
public void init()
{
int height=Integer.parseInt(getParameter("height"));
int width=Integer.parseInt(getParameter("width"));
lname=new Label("Name");
lno=new Label("Mobile no");
lsub=new Label("Subjects");
ldiv=new Label("Divison");
lgender=new Label("Gender");
laddr=new Label("Address");
tname=new TextField(10);
tno=new TextField(10);
tsub=new TextField(10);
tdiv=new TextField(10);
taddr=new TextArea(20,20);
cDiv=new Choice();
lSub=new List(4,true);
blogin=new Button("Login");
cGender=new CheckboxGroup();
cMale=new Checkbox("Male",cGender,false);
cFemale=new Checkbox("Female",cGender,false);
sb=new Scrollbar(Scrollbar.VERTICAL,0,5,0,height);
cDiv.add("A2");
cDiv.add("A1");
cDiv.add("A3");
lSub.add("maths");
lSub.add("science");
lSub.add("marathi");
lSub.add("english");
//add the controls....
add(lname);
add(tname);
add(lno);
add(tno);
add(lsub);
add(lSub);
add(ldiv);
add(cDiv);
add(lgender);
add(cMale);
add(cFemale);
add(laddr);
add(taddr);
add(blogin);
add(sb);
}
}