JApplet - super.paint (); causa tremulação
Estou escrevendo um JApplet agora, e sempre que chamo super.paint (), o applet pisca. Estou usando buffer duplo (desenhando para uma imagem e depois renderizando essa imagem), mas acho que super.paint () está limpando a tela ou algo assim, derrotando meu buffer duplo.
Sei que devo usar paintComponents (), mas, por algum motivo, quando chamo de "currentScreen.Draw (g)", ele não mostra o empate da tel
Alguém pode me ajudar com isso
public void paint(Graphics g)
{
super.paint(g);//Remove this and it works, but the JApplet background color will be gone, and everything will be white.
currentScreen.Draw(g);
}
Screen Draw Method
public void Draw(Graphics g)
{
if(buffer != null)
g.drawImage(buffer, 150, 0, null);
//g.drawString(drawstring, x, y);
}