void (Component c, Graphics2D g2, int width, int height) { float lw = LW(g2); float bw = BW.getFloat(); Area area = new Area(new Rectangle2D.Double(0, 0, width, height)); Shape innerShape = isRound(c) ? new RoundRectangle2D.Float(bw + lw, bw + lw, width - (bw + lw) * 2, height - (bw + lw) * 2, bw + lw, bw + lw) : new Rectangle2D.Float(bw + lw, bw + lw, width - (bw + lw) * 2, height - (bw + lw) * 2); area.subtract(new Area(innerShape)); area.add(getButtonBounds(c)); Area clip = new Area(g2.getClip()); area.intersect(clip); g2.setClip(area); }