Professional Documents
Culture Documents
Registration Form in Java
Registration Form in Java
2nd
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package jframe.form;
import javax.swing.*;
import java.awt.*;
//work of mine
//label for DOB
JLabel DOB = new JLabel();
DOB.setText("DOB: ");
DOB.setBounds(360, 160 , 40 , 30);
DOB.setOpaque(true);
DOB.setBackground(Color.lightGray);
jf.add(DOB);
//label for DOB
String Day
[]={"Day","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"};
JComboBox dy=new JComboBox(Day);
dy.setBounds(470, 160,50,30);
jf.add(dy);//adding Nationtext
String Month
[]={"Month","January","February","March","April","May","June","July","August","September","October"
,"November","December"};
JComboBox mn=new JComboBox(Month);
mn.setBounds(535, 160,60,30);
jf.add(mn);
String Year
[]={"Year","1990","1991","1992","1993","1993","1994","1995","1996","1997","1998","1998","1999","2
000","2001","2002","2003","2004","2005","2006"};
JComboBox yr = new JComboBox(Year);
yr.setBounds(610, 160,59,30);
jf.add(yr);
jf.add(lb);//name label
jf.add(bt1);//button
//JFrame functions
jf.setSize(900, 600);
jf.setLayout(null);
jf.setVisible(true);
}
}