public static void drawRoundedRectangle(int x, int y, int width,
			int height, int color, int alpha, boolean filled, boolean shadowed) {
		if (shadowed)
			drawRoundedRectangle(x + 1, y + 1, width, height, 0, alpha, filled,
					false);
		if (alpha == -1) {
			if (filled) {
				drawHorizontalLine(y + 1, color, width - 4, x + 2);
				drawHorizontalLine(y + height - 2, color, width - 4, x + 2);
				drawFilledPixels(height - 4, y + 2, x + 1, color, width - 2);
			}
			drawHorizontalLine(y, color, width - 4, x + 2);
			drawHorizontalLine(y + height - 1, color, width - 4, x + 2);
			drawVerticalLine(x, y + 2, height - 4, color);
			drawVerticalLine(x + width - 1, y + 2, height - 4, color);
			drawFilledPixels(x + 1, y + 1, 1, 1, color);
			drawFilledPixels(x + width - 2, y + 1, 1, 1, color);
			drawFilledPixels(x + width - 2, y + height - 2, 1, 1, color);
			drawFilledPixels(x + 1, y + height - 2, 1, 1, color);
		} else if (alpha != -1) {
			if (filled) {
				drawHorizontalAlphaLine(x + 2, y + 1, width - 4, color, alpha);
				drawHorizontalAlphaLine(x + 2, y + height - 2, width - 4, color, alpha);
				drawFilledAlphaPixels(x + 1, y + 2, width - 2, height - 4, color, alpha);
			}
			drawHorizontalAlphaLine(x + 2, y, width - 4, color, alpha);
			drawHorizontalAlphaLine(x + 2, y + height - 1, width - 4, color, alpha);
			drawVerticalAlphaLine(x, y + 2, height - 4, color, alpha);
			drawVerticalAlphaLine(x + width - 1, y + 2, height - 4, color, alpha);
			drawFilledAlphaPixels(x + 1, y + 1, 1, 1, color, alpha);
			drawFilledAlphaPixels(x + width - 2, y + 1, 1, 1, color, alpha);
			drawFilledAlphaPixels(x + 1, y + height - 2, 1, 1, color, alpha);
			drawFilledAlphaPixels(x + width - 2, y + height - 2, 1, 1, color, alpha);
		}
	}