void (Graphics g, boolean click) { Graphics2D g2 = (Graphics2D)g.create(); try { g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); g2.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_NORMALIZE); g2.setColor(click ? JBUI.CurrentTheme.ActionButton.pressedBackground() : JBUI.CurrentTheme.ActionButton.hoverBorder()); Rectangle rect = new Rectangle(getSize()); JBInsets.removeFrom(rect, getInsets()); int arc = JBUIScale.scale(JBUI.getInt("Button.arc", 6)); g2.fill(new RoundRectangle2D.Float(rect.x, rect.y, rect.width, rect.height, arc, arc)); } finally { g2.dispose(); } }