public void check() {
        if (this.isInputValid()) {
            this.setBackground(validColor);
        } else {
            this.setBackground(errorColor);
        }

        this.repaint();
    }