/** * Paints the background. * * @param g The graphics object to paint the background on. */ public void paint(Graphics g) { if (isPageVisible()) paintBackgroundPages((Graphics2D) g); else setBackground(graph.getBackground()); if (graph.getBackgroundImage() != null) { paintBackgroundImage((Graphics2D) g); } setOpaque(!isPageVisible() && graph.getBackgroundImage() == null); super.paint(g); setOpaque(true); }
@Override public void paint(Graphics g) { graphics = SwingGraphics.fromGraphics(g, this, graphics); super.paint(g); graphics.clear(); }