You are on page 1of 6

Nama : Alfedrik anggara

Kelas : 1857201002073

private void kurangActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

private void tambahActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

private void nolMouseClicked(java.awt.event.MouseEvent evt) {

layar.setText (layar.getText().concat ("0"));

private void satuMouseClicked(java.awt.event.MouseEvent evt) {

layar.setText (layar.getText().concat ("1"));

}
private void duaMouseClicked(java.awt.event.MouseEvent evt) {

layar.setText (layar.getText().concat ("2"));

private void tigaMouseClicked(java.awt.event.MouseEvent evt) {

layar.setText (layar.getText().concat ("3"));

private void empatMouseClicked(java.awt.event.MouseEvent evt) {

layar.setText (layar.getText().concat ("4"));

private void limaMouseClicked(java.awt.event.MouseEvent evt) {

layar.setText (layar.getText().concat ("5"));

private void enamMouseClicked(java.awt.event.MouseEvent evt) {

layar.setText (layar.getText().concat ("6"));

private void tujuhMouseClicked(java.awt.event.MouseEvent evt) {

layar.setText (layar.getText().concat ("7"));

private void delapanMouseClicked(java.awt.event.MouseEvent evt) {


layar.setText (layar.getText().concat ("8"));

private void sembilanMouseClicked(java.awt.event.MouseEvent evt) {

layar.setText (layar.getText().concat ("9"));

private void komaMouseClicked(java.awt.event.MouseEvent evt) {

layar.setText (layar.getText().concat ("."));

private void samadenganMouseClicked(java.awt.event.MouseEvent evt) {

layar.setText (layar.getText().concat ("="));

private void tambahMouseClicked(java.awt.event.MouseEvent evt) {

layar.setText (layar.getText().concat ("+"));

private void kurangMouseClicked(java.awt.event.MouseEvent evt) {

layar.setText (layar.getText().concat ("-"));

private void kaliMouseClicked(java.awt.event.MouseEvent evt) {

layar.setText (layar.getText().concat ("x"));


}

private void bagiMouseClicked(java.awt.event.MouseEvent evt) {

layar.setText (layar.getText().concat ("/"));

/**

* @param args the command line arguments

*/

public static void main(String args[]) {

/* Set the Nimbus look and feel */

//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">

/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.

* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html

*/

try {

for (javax.swing.UIManager.LookAndFeelInfo info :


javax.swing.UIManager.getInstalledLookAndFeels()) {

if ("Nimbus".equals(info.getName())) {

javax.swing.UIManager.setLookAndFeel(info.getClassName());

break;

} catch (ClassNotFoundException ex) {

java.util.logging.Logger.getLogger(kalkulator_2065.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);
} catch (InstantiationException ex) {

java.util.logging.Logger.getLogger(kalkulator_2065.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);

} catch (IllegalAccessException ex) {

java.util.logging.Logger.getLogger(kalkulator_2065.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);

} catch (javax.swing.UnsupportedLookAndFeelException ex) {

java.util.logging.Logger.getLogger(kalkulator_2065.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);

//</editor-fold>

/* Create and display the form */

java.awt.EventQueue.invokeLater(new Runnable() {

public void run() {

new kalkulator_2065().setVisible(true);

});

// Variables declaration - do not modify

private javax.swing.JButton bagi;

private javax.swing.JButton delapan;

private javax.swing.JButton dua;

private javax.swing.JButton empat;


private javax.swing.JButton enam;

private javax.swing.JButton kali;

private javax.swing.JButton koma;

private javax.swing.JButton kurang;

private javax.swing.JTextField layar;

private javax.swing.JButton lima;

private javax.swing.JButton nol;

private javax.swing.JButton samadengan;

private javax.swing.JButton satu;

private javax.swing.JButton sembilan;

private javax.swing.JButton tambah;

private javax.swing.JButton tiga;

private javax.swing.JButton tujuh;

// End of variables declaration

You might also like