How can I reduce the flickering in this java program?
I’m new to Java graphics, so most of this code is stuff I’ve gathered from the internet and injecting it into my own program. This program is meant to have a red square, controlled by the arrow keys, detect when it collides with a falling blue dot that resets to the top each time it hits the bottom.