목차
Calculator.java
Calculator.html
게산기.jpg
숫자, 오퍼레이터 그림파일들
Calculator.html
게산기.jpg
숫자, 오퍼레이터 그림파일들
본문내용
if (operand != "" && operand != "-"){
try{
total += Integer.parseInt(operand);
}catch(NumberFormatException e) // Exception Handling for overflow
{
JOptionPane.showMessageDialog(null, " overflow occur ",
"Exception occur", JOptionPane.INFORMATION_MESSAGE);
}
}
else total += 0;
operand = "";
operandField.setText(operand);
try{
total += Integer.parseInt(operand);
}catch(NumberFormatException e) // Exception Handling for overflow
{
JOptionPane.showMessageDialog(null, " overflow occur ",
"Exception occur", JOptionPane.INFORMATION_MESSAGE);
}
}
else total += 0;
operand = "";
operandField.setText(operand);
소개글