switch ( math_operator ) {
case '+':
total2 = total1 + Double.parseDouble(textDisplay.getText( ) );
break;
case '-':
total2 = total1 - Double.parseDouble(textDisplay.getText( ) );
break;
case '/':
total2 = total1 / Double.parseDouble(textDisplay.getText( ) );
break;
case '*':
total2 = total1 * Double.parseDouble(textDisplay.getText( ) );
break;
case '1/x': //MY ERROR IS RIGHT HERE.
total2=1/total1;
break;
case '√':
total2 = Math.pow(total1,.5);
break;
case '%':
total2 = total1/100;
case '2':
total2 = Math.pow(total1,2);
textDisplay.setText(Double.toString(total2));
total1=0;}