posted 16 years ago
Hi. I have a problem. I am making Connect Four and just implemented DoubleBuffering to make it smooth when i repaint (as I may add animation later), and I have buttons that the user clicks on to drop tokens into the board.
However, when I implemented DoubleBuffering, it paints over the buttons I have. They are there, but invisible or flicker when moused over.
I suspect the problem is due to the fact that it is capturing the entire screen. Any way to work around that? This is how I have implemented it.
I can call g.drawImage(IBuffer, 0, 50, this) with a bigger number and get the buttons to show up just fine but the board is far too far away from the buttons. I want them closer.
What is a good way to implement double buffering when buttons are on the same screen?
Technology can never substitute for knowledge.