/** * Paints a customized background. * * @param g the <tt>Graphics</tt> object through which we paint */ @Override protected void paintComponent(Graphics g) { super.paintComponent(g); g = g.create(); if (!(treeNode instanceof GroupNode) && !isSelected) return; AntialiasingManager.activateAntialiasing(g); Graphics2D g2 = (Graphics2D) g; try { internalPaintComponent(g2); } finally { g.dispose(); } }