How do I create an image with rounded corners in Java?
When I draw BufferedImage with rounded corners
BufferedImage image = new BufferedImage(100, 100, BufferedImage.TYPE_INT_RGB);
Graphics2D graphics = image.createGraphics();
graphics.setColor(Color.WHITE);
graphics.fill(new RoundRectangle2D.Float(0, 0, 60, 60, 20, 20));
Output Image:
How can I get the image without black cornerns?
+3
source to share