protected void paintComponent(Graphics g) { Graphics2D g2 = (Graphics2D) g; final Object old = g2.getRenderingHint(RenderingHints.KEY_ANTIALIASING); g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); g.setColor(getFillColor()); g.fillRect(1, 1, getWidth() - 2, getHeight() - 2); DrawUtil.drawRoundRect(g, 0, 0, getWidth() - 1, getHeight() - 1, getBoundsColor()); g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, old); }