import import import import
javax.swing.*; java.awt.*; java.awt.event.*; java.awt.color.*;
public class applicant extends japplet{ // variable for frame window static jpanel panel; // variable for labels jlabel labelappid; jlabel labelappname; jlabel labelappaddress; jlabel labelappposition; // variable for data entry controls jtextfield textappid; jtextfield textappname; jtextfield textappaddress; jcombobox comboappposition; // define button to accept values jbutton buttonaccept; public void init(){ /*add appropriate controls to the frame *in the constructor*/ // create a panel panel = new jpanel(); getcontentpane().add(panel); setsize(350,90); settitle("geoffrey"); //create and add the appropriate labels labelappid = new jlabel("applicant id"); labelappid.setforeground(color.blue); textappid = new jtextfield(5); labelappname = new jlabel("applicant name"); textappname = new jtextfield(10); labelappaddress = new jlabel("address"); textappaddress = new jtextfield(10); labelappposition = new jlabel("position"); string positions[] = {"manager", "executive", "associate","surbordinate"}; comboappposition = new jcombobox(positions); buttonaccept = new jbutton("accept"); panel.add(labelappid); panel.add(textappid); panel.add(labelappname); panel.add(textappname); panel.add(labelappaddress); panel.add(textappaddress);
panel.add(labelappposition); panel.add(comboappposition); panel.add(buttonaccept); panel.setbackground(color.green); panel.setsize(450,350); } }