Professional Documents
Culture Documents
Calculator R
Calculator R
Calculator R
{
String all=display.getText()+s;
display.setText(all);
}
private void offActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
this.dispose();
}
private void n1ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
setAll("1");
}
private void n2ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
setAll("2");
}
private void n3ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
setAll("3");
}
private void n4ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
setAll("4");
}
private void n5ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
setAll("5");
}
private void n6ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
setAll("6");
}
private void n7ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
setAll("7");
}
private void n8ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
setAll("8");
}
private void n9ActionPerformed(java.awt.event.ActionEvent evt) {
{
case '+'
break;
case '-'
break;
case '*'
break;
case '/'
: result1=num1+num2;
: result1=num1-num2;
: result1=num1*num2;
:
result1=num1/num2;
break;
}
display.setText(String.valueOf(result1));
}
//end