void drawCorners(GC gc, Rectangle bounds) { Color bg = gc.getBackground(); Color fg = gc.getForeground(); Color toFill = parent.getParent().getBackground(); gc.setAlpha(255); gc.setBackground(toFill); gc.setForeground(toFill); int radius = cornerSize / 2 + 1; int leftX = bounds.x - 1; int topY = bounds.y - 1; int rightX = bounds.x + bounds.width; int bottomY = bounds.y + bounds.height; drawCutout(gc, leftX, topY, radius, CirclePart.LEFT_TOP); drawCutout(gc, rightX, topY, radius, CirclePart.RIGHT_TOP); drawCutout(gc, leftX, bottomY, radius, CirclePart.LEFT_BOTTOM); drawCutout(gc, rightX, bottomY, radius, CirclePart.RIGHT_BOTTOM); gc.setBackground(bg); gc.setForeground(fg); }