MODUL 10 PEMROGRAMAN VISUAL
TUGAS PRAKTIKUM PEMROGRAMAN VISUAL
MODUL 10
private void bclearActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
enim.setText("");
enama.setText("");
hasil.setText("");
hasil2.setText("");
arearesume.setText("");
}
private void bexitActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
dispose();
}
private void bprosesActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
int IndexCombo;
String pilihan;
char kelamin;
String daftarhoby="";
IndexCombo = cbagama.getSelectedIndex();
pilihan=(String)cbagama.getSelectedItem();
hasil.setText(pilihan);
kelamin ='W';
if (rbpria.isSelected()){
kelamin ='P';
}else{
kelamin = 'W';
hasil2.setText(String.valueOf(kelamin));
if(cbmenyanyi.isSelected())
daftarhoby +=cbmenyanyi.getText()+"\n";
if(cbmenari.isSelected())
daftarhoby +=cbmenari.getText()+"\n";
if(cbrenang.isSelected())
daftarhoby +=cbrenang.getText()+"\n";
if(cbbadminton.isSelected())
daftarhoby +=cbbadminton.getText()+"\n";
if(cbmemasak.isSelected())
daftarhoby +=cbmemasak.getText()+"\n";
if(cbpuisi.isSelected())
daftarhoby +=cbpuisi.getText()+"\n";
arearesume.setText(
"NIM :\t" +enim.getText()+"\n"+
"NAMA :\t" +enama.getText()+"\n"+
"AGAMA :\t" +pilihan+"\n"+
"KELAMIN :\t" +kelamin+"\n"+
"HOBY :\t" +daftarhoby+"\n"
);
}
}
0 comments