void (@NotNull Graphics g, @NotNull Rectangle rect, @NotNull Color color) { Graphics2D g2 = (Graphics2D)g.create(); g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); g2.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_NORMALIZE); try { g2.setColor(color); float arc = getButtonArc().getFloat(); float lw = DarculaUIUtil.LW.getFloat(); Path2D border = new Path2D.Float(Path2D.WIND_EVEN_ODD); border.append(new RoundRectangle2D.Float(rect.x, rect.y, rect.width, rect.height, arc, arc), false); border .append(new RoundRectangle2D.Float(rect.x + lw, rect.y + lw, rect.width - lw * 2, rect.height - lw * 2, arc - lw, arc - lw), false); g2.fill(border); } finally { g2.dispose(); } }