Skip to content

Commit 6760738

Browse files
create text field
1 parent c6c7e11 commit 6760738

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import java.awt.*;
2+
import java.awt.event.*;
3+
public class JavaAWT extends Frame
4+
{
5+
TextField name,pass;
6+
Button b1,b2;
7+
JavaAWT()
8+
{
9+
setLayout(new FlowLayout());
10+
this.setLayout(null);
11+
Label n=new Label("First Name:",Label.CENTER);
12+
Label p=new Label("Last Name:",Label.CENTER);
13+
name=new TextField(20);
14+
pass=new TextField(20);
15+
b1=new Button("submit");
16+
b2=new Button("cancel");
17+
this.add(n);
18+
this.add(name);
19+
this.add(p);
20+
this.add(pass);
21+
this.add(b1);
22+
this.add(b2);
23+
n.setBounds(70,90,90,60);
24+
p.setBounds(70,130,90,60);
25+
name.setBounds(200,100,90,20);
26+
pass.setBounds(200,140,90,20);
27+
b1.setBounds(100,260,70,40);
28+
b2.setBounds(180,260,70,40);
29+
30+
}
31+
public static void main(String args[])
32+
{
33+
JavaAWT ml=new JavaAWT();
34+
ml.setVisible(true);
35+
ml.setSize(400,400);
36+
ml.setTitle("Welcome to Proshanta Debnath Login Window");
37+
38+
}
39+
}
40+

0 commit comments

Comments
 (0)