-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathform.java
More file actions
35 lines (35 loc) · 791 Bytes
/
form.java
File metadata and controls
35 lines (35 loc) · 791 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
import java.awt.*;
import java.awt.event.*;
class form extends Frame implements ActionListener
{
Label l1=new Label("Title : ");
Label l2=new Label("Body : ");
Label l3=new Label(" ");
TextField t1=new TextField();
TextField t2=new TextField();
Button b=new Button("submit");
form()
{
add(l1); add(t1);
add(l2); add(t2);
add(b);
add(l3);
l1.setBounds(20,45,70,20);
t1.setBounds(180,45,200,20);
l2.setBounds(20,95,70,20);
t2.setBounds(180,95,200,20);
b.setBounds(150,150,100,50);
b.addActionListener(this);
}
public void actionPerformed(ActionEvent e)
{
l3.setText("SUBMITTED "+t2.getText());
}
public static void main(String s[])
{
form l=new form();
l.setSize(new Dimension(400,400));
l.setTitle("Notes");
l.setVisible(true);
}
}