National University of Modern Languages
National University of Modern Languages
package javaapplication46;
import java.awt.*;
class reg extends Frame{
reg(String s){
super(s);
GridLayout gl=new GridLayout(6,1);
setLayout(gl);
Label l =new Label("NAME");
add(l);
TextField t=new TextField("10");
add(t);
Label l4 =new Label("GENDER");
add(l4);
TextField t4=new TextField("10");
add(t4);
Label l1 =new Label("PASSWORD");
add(l1);
TextField t1=new TextField("10");
add(t1);
Label l2 =new Label("E-MAIL");
add(l2);
TextField t2=new TextField("10");
add(t2);
Label l3 =new Label("PHONE NUMBER");
add(l3);
TextField t3=new TextField("10");
add(t3);
Button b=new Button("REGISTER");
add(b);
setSize(400,400);
setLocation(300,300);
setBackground(Color.white);
setForeground(Color.black);
setVisible(true);
setLayout(null);
}
}
public class JavaApplication46 {
public static void main(String[] args) {
reg r=new reg("REFISTERATION FORM");
}
}
Output: