1. Desain LAyout
Keterangan :
Pallete
2. Program
private void BtnSaveActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
int Indexcombo;
String Pilihan;
char kelamin;
Indexcombo = cbagama.getSelectedIndex();
Pilihan = (String)cbagama.getSelectedItem();
if (RbLaki.isSelected())
kelamin = 'L';
else
kelamin = 'P';
AreaResume.setText("Nama : "+tfnama.getText()+"\n"+
"Jenis Kelamin : "+kelamin+"\n" +
"Agama : "+Pilihan+"\n"
);
}
3. Output
Komentar
Posting Komentar