forked from Ashish8104/Java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTest1.java
More file actions
38 lines (32 loc) · 666 Bytes
/
Test1.java
File metadata and controls
38 lines (32 loc) · 666 Bytes
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
import java.awt.*;
class Test1 extends Frame
{
Test1()
{
setBounds(500,400,500,300);
setVisible(true);
setLayout(null);
Label l1 = new Label("Name");
Label l2 = new Label("Password");
TextField f1 = new TextField();
TextField f2 = new TextField();
l1.setBounds(50,50,100,30);
f1.setBounds(180,50,100,30);
l2.setBounds(50,120,100,30);
f2.setBounds(180,120,100,30);
Button b1 = new Button("Submit");
b1.setBounds(100,180,70,30);
Button b2 = new Button("Reset");
b2.setBounds(200,180,70,30);
add(l1);
add(f1);
add(l2);
add(f2);
add(b1);
add(b2);
}
public static void main(String s[])
{
new Test1();
}
}