private void Calculate() {
        Float value1 = 0.0f;
        try {
            value1 = Float.parseFloat(input1.getText());
        } catch (NumberFormatException ex) {
            output.setText("input1 Not supported ");
        }
        Float value2 = 0.0f;
        try {
            value2 = Float.parseFloat(input2.getText());
        } catch (NumberFormatException ex) {
            output.setText("input2 Not supported ");
        }
        Float result = 0.0f;
        switch (operator) {
            case "+":
                result = value1 + value2;
                break;
            case "-":
                result = value1 - value2;
                break;
            case "*":
                result = value1 * value2;
                break;
            case "/":
                result = value1 / value2;
                break;
            default:
                output.setText("Not supported Operation");
                break;
        }
        output.setText(result.toString());
    }