private void renderError(Graphics2D g) {
        if (ERROR != null) {
            g.setFont(new Font("TimesRoman", Font.PLAIN, 30));
            FontMetrics fontMetrics = g.getFontMetrics();
            float xLeft = (float) (CARD_WIDTH + CARD_X_GAP);

            float x = (getWidth() - xLeft - fontMetrics.stringWidth(ERROR)) / 2;
            x += xLeft;
            float y = (float) (DECK_Y + CARD_HEIGHT / 2);
            g.setColor(Color.RED);
            g.drawString(ERROR, x, y);
        }
    }