-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathregistration.java
More file actions
62 lines (51 loc) · 1.08 KB
/
registration.java
File metadata and controls
62 lines (51 loc) · 1.08 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
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
class practical6 extends Frame implements ActionListener
{
JTextField rno,sname,per,gen,clas;
JLabel text;
JButton btn;
practical6()
{
setSize(400,400);
setLayout(new FlowLayout());
JLabel lRno=new JLabel("Roll No:");
rno=new JTextField(20);
add(lRno);
add(rno);
JLabel lSname=new JLabel("Name:");
sname=new JTextField(20);
add(lSname);
add(sname);
JLabel lper=new JLabel("Percentage:");
per=new JTextField(20);
add(lper);
add(per);
JLabel lgen=new JLabel("Gender:");
gen=new JTextField(20);
add(lgen);
add(gen);
JLabel lclass=new JLabel("Class:");
clas=new JTextField(20);
add(lclass);
add(clas);
text=new JLabel("");
btn=new JButton("Submit");
add(btn);
add(text);
btn.addActionListener(this);
setVisible(true);
}
public void actionPerformed(ActionEvent e)
{
if(e.getSource()==btn)
{
text.setText("Submit....");
}
}
public static void main(String a[])
{
new practical6();
}
}