I‘m building a medical application to fight blood cancer. Well, it’s more like restaurating, get very old legacy code up to date &!changing the company’s culture to a modern way of project management
It’s a Long time since I used Java and implemented double buffering. I’m not sure if I am correct. But my first finding, which I think is not necessary: you create and dispose the graphics ctx of the buffer. Just use the one you created in the constructor. And I don’t think you should dispose the panels Graphics. Just try it and observe for memory
Thanks for the tip. Though, when I tried this, the canvas didn't draw anything (it stayed white). Where previously, it displayed an image, then went to black (which is where the flickering started).
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
It’s a Long time since I used Java and implemented double buffering. I’m not sure if I am correct. But my first finding, which I think is not necessary: you create and dispose the graphics ctx of the buffer. Just use the one you created in the constructor. And I don’t think you should dispose the panels Graphics. Just try it and observe for memory
Thanks for the tip. Though, when I tried this, the canvas didn't draw anything (it stayed white). Where previously, it displayed an image, then went to black (which is where the flickering started).