-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSignUpForm.java
More file actions
75 lines (55 loc) · 1.9 KB
/
SignUpForm.java
File metadata and controls
75 lines (55 loc) · 1.9 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/**************
* Author : Ajay Johny
* Program : Simple signUp Form
****************/
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public class SignUpForm extends Frame implements ActionListener{
TextField Name = new TextField(20);
TextField MailId = new TextField(20);
TextField Password = new TextField(20);
TextField mobileNo = new TextField(20);
Button button;
Label label1,label2,label3,label4;
public SignUpForm(){
//Title
setTitle(" Sign Up Form ");
setLayout(new FlowLayout());
setVisible(true);
setSize(200,400);
button = new Button("submit");
// for getting name
label1 = new Label("Name");
label1.setAlignment(Label.LEFT);
add(label1);
add(Name);
// for mail id field
label2 = new Label("Mail");
label2.setAlignment(Label.LEFT);
add(label2);
add(MailId);
// for password
label3 = new Label("password");
label3.setAlignment(Label.LEFT);
add(label3);
add(Password);
// for mobile
label4 = new Label("Mobie No ");
label4.setAlignment(Label.LEFT);
add(label4);
add(mobileNo);
// adding button
add(button);
button.addActionListener( this);
}
public void actionPerformed(ActionEvent e) {
System.out.println("Name : " +Name.getText());
System.out.println("Mail Id : " +MailId.getText());
System.out.println("Password : " +Password.getText());
System.out.println("Mobile No : " +mobileNo.getText());
}
public static void main(String args []){
SignUpForm sf = new SignUpForm();
}
}