First post O_O
This has probably been asked a million times before, but I did a little search and couldn’t find a solution to my problem.
Anyway, I’ve made a window with a rectangle that redraws itself vertically until the user clicks somewhere else in the window and it starts again from that position. Problem is I only want one rectangle to show at a time, ie I want to erase the previous ones.
I thought I’d try double buffering, but I can’t get my head round it. Would I need to use BufferedStrategy or BufferedImage? How do I draw offscreen?
Confusing thing is, I made a program about half a year ago that does exactly what I want this to do, only I’ve used paintComponent and Ellipse2D instead of paint and drawRect. Does it matter which one I use?
Sorry if I’m not making any sense, I’m not very good at forum-posting
Thanks in advance for any help!