-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAppComponents.java
More file actions
50 lines (49 loc) · 1.23 KB
/
Copy pathAppComponents.java
File metadata and controls
50 lines (49 loc) · 1.23 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
import java.applet.*;
import java.awt.*;
public class AppComponents extends Applet
{
TextField tf;
TextArea ta;
Label l;
Button b;
CheckboxGroup cbg;
Checkbox DNA, RNA, Protein, Others;
Choice ch;
List lst;
Scrollbar sb;
public void init()
{
sb = new Scrollbar(Scrollbar.VERTICAL, 0, 1, 0, 9);
cbg = new CheckboxGroup();
DNA = new Checkbox("DNA", cbg, false);
RNA = new Checkbox("RNA", cbg, false);
Protein = new Checkbox("Protein");
Others = new Checkbox("Others",null,false);
ch = new Choice();
ch.add("Sequence");
ch.add("Structure");
ch.add("Function");
lst = new List(4,false);
lst.add("Keratin");
lst.add("Collagen");
lst.add("Actin");
lst.add("Myosin");
tf = new TextField(20);
ta = new TextArea(20,20);
l = new Label("Enter Protein Name");
b = new Button("Submit Sequence");
}
public void start()
{
add(sb);
add(l);
add(tf);
add(ta);
add(DNA);
add(RNA);
add(Protein);
add(Others);
add(ch);
add(lst);
}
}