+ 2
Help with JAVA Swing!
Here is what to do: 1.Launch the code 2.Draw something in the opened window 3.Change the size of the window with the help of your mouse. Just drag the border of your window to make it smaller or bigger. You'll see that all content on the window disappeared. So, my question is: how to make it stay there regardless of whatever happens to the window? Thank you! The code goes here: https://code.sololearn.com/crmdkI9Q7b4x/?ref=app
2 Réponses
+ 3
If you want to fix this do the following
- Constantly Save Graphics Data
- Update JFrame / JPanel
You can achive this by using BufferedStradegy
https://docs.oracle.com/javase/7/docs/api/java/awt/image/BufferStrategy.html
0
Skrub Look like great solution! Thanks 👍