@Override
    public void paintComponent(Graphics graphics) {
        graphics.setColor(Color.BLACK);
        graphics.fillRect(0, 0, getWidth(), getHeight());
        graphics.setFont(descent.getTitleFont().deriveFont(48.0F));
        graphics.setColor(Color.WHITE);
        graphics.drawString(title, (getWidth() - graphics.getFontMetrics().charsWidth(title.toCharArray(), 0, title.length())) / 2, (graphics.getFontMetrics().getLeading() + graphics.getFontMetrics().getMaxAscent()) * 2);
        graphics.setFont(descent.getTitleFont().deriveFont(16.0F));
        int x = (getWidth() - MENU_ITEM_WIDTH) / 2;
        int y = 128;
        for (MenuItem menuItem : getMenuItems()) {
            Point mouse = MouseInfo.getPointerInfo().getLocation();
            if (mouse.getX() - getLocationOnScreen().getX() >= x && mouse.getY() - getLocationOnScreen().getY() >= y && mouse.getX() - getLocationOnScreen().getX() <= getWidth() - x && mouse.getY() - getLocationOnScreen().getY() <= y + 32 + graphics.getFontMetrics().getMaxAscent()) {
                graphics.setColor(Color.RED);
                graphics.fillRoundRect(x - 8, y - 8, MENU_ITEM_WIDTH + 16, 32 + graphics.getFontMetrics().getMaxAscent() + 16, 16, 16);
                graphics.setColor(Color.BLACK);
                graphics.fillRoundRect(x + 8, y + 8, MENU_ITEM_WIDTH - 16, 32 + graphics.getFontMetrics().getMaxAscent() - 16, 16, 16);
                graphics.setColor(Color.WHITE);
            } else {
                graphics.setColor(Color.WHITE);
            }
            graphics.drawRect(x, y, MENU_ITEM_WIDTH, 32 + graphics.getFontMetrics().getMaxAscent());
            graphics.drawString(menuItem.getTitle(), (getWidth() - graphics.getFontMetrics().charsWidth(menuItem.getTitle().toCharArray(), 0, menuItem.getTitle().length())) / 2, 16 + graphics.getFontMetrics().getAscent() + y);
            y += 1.5 * (32 + graphics.getFontMetrics().getMaxAscent());
        }
    }