Sunday, 19 July 2015

SIMPLE PROGRAMME TO DRAW A APPLICATION FORM AND LABELS AND TEXTFIELD AND BUTTONS.

programme:- To draw a form (Application form) like Labels and TextFields and Buttons


import java.awt.*;
import java.applet.*;
//<applet code="applicationform" height="900" width="500"></applet>
public class applicationform extends Applet
{
Label l1=new Label("application form",Label.CENTER);
Label l2=new Label("Name");
TextField t1=new TextField(10);
Label l3=new Label("Father's name");
TextField t2=new TextField(10);
Label l4=new Label("Mother's name");
TextField t3=new TextField(10);
Label l5=new Label("mobile no.");
TextField t4=new TextField(10);
Label l6=new Label("Address");
TextField t5=new TextField(10);
Button b1=new Button("Save");
Button b2=new Button("Submit");
Button b3=new Button("Send");
public void init()
{
add(l1);
add(l2);
add(t1);
add(l3);
add(t2);
add(l4);
add(t3);
add(l5);
add(t4);
add(l6);
add(t5);
add(b1);
add(b2);
add(b3);
}
}



Run this programme;-
1) javac applicationform.java
2) appletviewer applicationform.java

No comments:

Post a Comment