graphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
switch(tabOrientation) {
case HORIZONTAL: {
graphics.setPaint(new GradientPaint(width / 2f, 0, buttonBevelColor,
width / 2f, height / 2f, backgroundColor));
graphics.fill(new RoundRectangle2D.Double(0.5, 0.5, width - 1, height - 1 + buttonCornerRadius,
buttonCornerRadius, buttonCornerRadius));
break;
}
case VERTICAL: {
graphics.setPaint(new GradientPaint(0, height / 2f, buttonBevelColor,
width / 2f, height / 2f, backgroundColor));
graphics.fill(new RoundRectangle2D.Double(0.5, 0.5, width - 1 + buttonCornerRadius, height - 1,
buttonCornerRadius, buttonCornerRadius));
break;
}