void (Component c, Graphics g, int x, int y, int width, int height) { Color oldColor = g.getColor(); g.setColor(JBColor.border()); Graphics2D g2 = (Graphics2D)g; Object oldHint = g2.getRenderingHint(RenderingHints.KEY_ANTIALIASING); g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); try { doPaint(c, g, x, y, width, height); } finally { g.setColor(oldColor); g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, oldHint); } }