import [Link].
*;
public class Form {
public static void main(String[] args) {
JFrame f = new JFrame("Form Example");
[Link](JFrame.EXIT_ON_CLOSE);
JLabel lb = new JLabel("Form Example");
[Link](50, 50, 100, 50);
[Link](lb);
JLabel lb1 = new JLabel("Name:");
[Link](100, 100, 100, 30);
[Link](lb1);
JTextField tf = new JTextField("Enter name.");
[Link](150, 100, 90, 30);
[Link](tf);
JPasswordField pf = new JPasswordField();
JLabel lb2 = new JLabel("Password:");
[Link](100, 150, 80, 30);
[Link](200, 150, 100, 30);
[Link](lb2);
[Link](pf);
JLabel lb3 = new JLabel("Fruits:");
[Link](100, 200, 100, 50);
[Link](lb3);
JCheckBox cb1 = new JCheckBox("Mango");
[Link](100, 250, 100, 50);
JCheckBox cb2 = new JCheckBox("Papaya");
[Link](100, 300, 100, 50);
JCheckBox cb3 = new JCheckBox("Orange");
[Link](100, 350, 100, 50);
[Link](cb1);
[Link](cb2);
[Link](cb3);
JLabel lb4 = new JLabel("Gender:");
[Link](100, 400, 100, 50);
[Link](lb4);
JRadioButton r1 = new JRadioButton("Male");
[Link](100, 450, 100, 50);
JRadioButton r2 = new JRadioButton("Female");
[Link](100, 500, 100, 50);
ButtonGroup bg = new ButtonGroup();
[Link](r1);
[Link](r2);
[Link](r1);
[Link](r2);
JButton bt = new JButton("Submit");
[Link](100, 550, 100, 50);
[Link](bt);
[Link](null);
[Link](800, 800);
[Link](true);
}
}