-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFirstWork.java
More file actions
39 lines (30 loc) · 1 KB
/
FirstWork.java
File metadata and controls
39 lines (30 loc) · 1 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
import javax.swing.*;
public class FirstWork{
public static void main(String args[]){
JFrame f = new JFrame("Data Entry Form");
JLabel a = new JLabel("Enter Your name:");
a.setBounds(100, 100, 100, 40);
JTextField t = new JTextField("");
t.setBounds(220,100,200,50);
JLabel b = new JLabel("Enter Your Age:");
b.setBounds(100, 200, 100, 40);
JTextField t2 = new JTextField("");
t2.setBounds(220,200,200,50);
JLabel c = new JLabel("Enter Your Address:");
c.setBounds(100, 300, 200, 50);
JTextField t3 = new JTextField("");
t3.setBounds(220,300,200,50);
JButton d = new JButton("Submit");
d.setBounds(220, 440, 100, 40);
f.add(d);
f.add(a);
f.add(b);
f.add(c);
f.add(t);
f.add(t2);
f.add(t3);
f.setSize(600,600);
f.setLayout(null);
f.setVisible(true);
}
}