/** * Customizes the background of this panel, by painting a round rectangle in the background color * previously set. * * @param g the <tt>Graphics</tt> object to use for painting */ public void paintComponent(Graphics g) { super.paintComponent(g); g = g.create(); try { AntialiasingManager.activateAntialiasing(g); g.setColor(backgroundColor); g.fillRoundRect(0, 0, this.getWidth(), this.getHeight(), 20, 20); } finally { g.dispose(); } }
/** @{inheritDoc} */ @Override public void paintComponent(Graphics g) { super.paintComponent(g); g = g.create(); try { AntialiasingManager.activateAntialiasing(g); g.setColor(Color.DARK_GRAY); g.fillRoundRect(0, 0, this.getWidth(), this.getHeight(), 10, 10); } finally { g.dispose(); } }