import javax.swing.ButtonGroup;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JRadioButton;
import javax.swing.JTextArea;
import javax.swing.JTextField;
public class biodata {
public static void main(String[] args) {
JFrame frame = new JFrame();
frame.setSize(230, 250);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setTitle("Biodata Mahasiswa");
frame.setLocationRelativeTo(null);
JPanel panel = new JPanel();
JLabel nama = new JLabel("Nama :");
JLabel nim = new JLabel("Nim :");
JLabel agama = new JLabel("Agama :");
JLabel jeniskelamin = new JLabel("Jenis Kelamin :");
JTextField tx1 = new JTextField(15);
JTextField tx2 = new JTextField(15);
JComboBox agm = new JComboBox();
agm.addItem("Islam");
agm.addItem("Kristen");
agm.addItem("Budha");
agm.addItem("Hindu");
JRadioButton pria = new JRadioButton("Pria");
JRadioButton wanita = new JRadioButton("Wanita");
ButtonGroup jk = new ButtonGroup();
jk.add(pria);
jk.add(wanita);
JButton exit = new JButton("Exit");
JButton clear = new JButton("Clear");
JButton process = new JButton("Process");
panel.add(nama);
panel.add(tx1);
panel.add(nim);
panel.add(tx2);
panel.add(agama);
panel.add(agm);
panel.add(jeniskelamin);
panel.add(pria);
panel.add(wanita);
panel.add(exit);
panel.add(clear);
panel.add(process);
frame.add(panel);
frame.setVisible(true);
}
}
Minggu, 04 Desember 2011
Langganan:
Posting Komentar (Atom)
0 komentar:
Posting Komentar