• Create Account

### #Actualde_mattT

Posted 12 December 2012 - 03:51 PM

I just had a look at an old game I made and I did the following for double buffering. I can't remember why but I just played it and it runs fine.

panel.setDoubleBuffered(true);
RepaintManager.currentManager(frame).setDoubleBufferingEnabled(true);


Where panel is my extended JPanel with the overriden paintComponent() method (I saw that I'm not calling repaint() at the end of my paintComponent() method, which supports PsychotikRabbit's suggestion).
Where frame is a JFrame.

Hope this works for you too.

Matt

### #2de_mattT

Posted 12 December 2012 - 03:50 PM

I just had a look at an old game I made and I did the following for double buffering. I can't remember why but I just played it and it runs fine.

panel.setDoubleBuffered(true);
RepaintManager.currentManager(frame).setDoubleBufferingEnabled(true);

Where panel is my extended JPanel with the overriden paintComponent() method (I saw that I'm not calling repaint() at the end of my paintComponent() method, which supports PsychotikRabbit's suggestion).
Where frame is a JFrame.

Hope this works for you too.

Matt

### #1de_mattT

Posted 12 December 2012 - 03:49 PM

I just had a look at an old game I made and I did the following for double buffering. I can't remember why but I just played it and it runs fine.

panel.setDoubleBuffered(true);
RepaintManager.currentManager(frame).setDoubleBufferingEnabled(true);

Where panel is my extended JPanel with the overriden paintComponent method.(I saw that I'm not calling repaint() at the end of my paintComponent method, as per PsychotikRabbit's suggestion.
Where frame is a JFrame.

Hope this works for you too.

Matt

PARTNERS