import java.awt.geom.*; static void drawRoundedBox(Graphics2D g, int x, int y, int w, int h, int roundness, Color color) { g.setColor(color); g.draw(new RoundRectangle2D.Double(x, y, w, h, roundness, roundness)); }