public void operationManager(char symbol) throws DivisionByZeroException {
        if (!"".equals(text.getText())) {
            switch (symbol) {
                case '+':
                    memory = memory + Double.parseDouble(text.getText());
                    break;
                case '-':
                    memory = memory - Double.parseDouble(text.getText());
                    break;
                case '*':
                    memory = memory * Double.parseDouble(text.getText());
                    break;
                case '/':
                    if (!"0".equals(text.getText())) {
                        memory = memory / Double.parseDouble(text.getText());
                    } else {
                        JOptionPane.showMessageDialog(rootPane, "Division by zero!");
                        throw new DivisionByZeroException("Division by zero!");
                    }                
                    break;
                case startAction:
                    memory = Double.parseDouble(text.getText());
            }
        }
    }