List of usage examples for javax.swing JPanel setDoubleBuffered
public void setDoubleBuffered(boolean aFlag)
From source file:com.limegroup.gnutella.gui.notify.AnimatedWindow.java
@Override public void setContentPane(Container contentPane) { this.contentPane = contentPane; JPanel panel = new JPanel(new BorderLayout()) { /**// w w w. j a va 2 s.c om * */ private static final long serialVersionUID = 1025231305407376307L; @Override public void paint(Graphics g) { if (animationImage != null && isAnimationInProgress()) { mode.paint(AnimatedWindow.this, g, backgroundImage, animationImage); } else { super.paint(g); } } }; panel.setDoubleBuffered(true); panel.add(contentPane, BorderLayout.CENTER); super.setContentPane(panel); }