void (Component c, Graphics2D g2, int width, int height) { Area area = new Area(new Rectangle2D.Float(0, 0, width, height)); float lw = lw(g2); float bw = bw(); area.subtract(new Area(new Rectangle2D.Float(bw + lw, bw + lw, width - (bw + lw) * 2, height - (bw + lw) * 2))); area.intersect(new Area(g2.getClip())); g2.setClip(area); }