Skip to content

Instantly share code, notes, and snippets.

@griajobag
Created January 18, 2017 03:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save griajobag/262f571001279258797e34cc5c5e7715 to your computer and use it in GitHub Desktop.
Save griajobag/262f571001279258797e34cc5c5e7715 to your computer and use it in GitHub Desktop.
kalkulator sederhana
private void btnTambahActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
operation = 0;
lblOperasi.setText("+");
hasChooseAnOperation =true;
}
private void btnKurangActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
operation = 1;
lblOperasi.setText("-");
hasChooseAnOperation =true;
}
private void btnKaliActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
operation = 2;
lblOperasi.setText("*");
hasChooseAnOperation =true;
}
private void btnBagiActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
operation = 3;
lblOperasi.setText("/");
hasChooseAnOperation =tr
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment