Operator Logika Menggunakan Java

Operator Logika Dengan CheckBox

private void jCheckBox1StateChanged(javax.swing.event.ChangeEvent evt) {
// TODO add your handling code here:
if (jCheckBox1.isSelected()==true&&jCheckBox2.isSelected()==false||jCheckBox1.isSelected()==false&&jCheckBox2.isSelected()==true){
jTextField1.setText(“Rp.15.000”);
}
else if(jCheckBox1.isSelected()==true&&jCheckBox2.isSelected()==true){
jTextField1.setText(“Rp.20.000”);
}
else{jTextField1.setText(“Rp.0.00”);
}
}

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s

%d blogger menyukai ini: