I almost have the repaint() Jcomponent working. I had it working and then tried to make an absolute positioning and now it doesn\'t work.
import java.awt.Col
Another way to use the Timer class:
Timer t = new Timer(510, new ActionListener() { @Override public void actionPerformed(ActionEvent e) { rectangle_x++; repaint(); } }) ... t.start();
You still need to override actionPerformed() in your main class though.