Click here to Skip to main content
15,890,527 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
Whenever I resize the window screen , it turns blank and the shape disappears.


What I have tried:

I tried adding : Toolkit.getDefaultToolkit().sync(); to refresh the canvas but it didn't work.
here is the code I added:
RefreshCanvas3D canvas3D =
new RefreshCanvas3D(config);

class RefreshCanvas3D extends Canvas3D {

public RefreshCanvas3D(GraphicsConfiguration config) {
super(config);
}

public void paint(Graphics g) {
super.paint(g);
Toolkit.getDefaultToolkit().sync();
}
}

Does anyone know what is the problem?
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900