You have too much going on in your paint--and it should be in a paintComponent instead--you can do all of this calculation outside your paintComponent--render to a BufferedImage and then in your paintComponent all you need do is:
Manuela Sucerquia wrote:Hi, I have a problem with a code I had to work on. I have no idea why the KeyListener or de ActionListener is not working. What could it be? Note: I need to stop, restart, speed up and slow down the movement on the "pendulum", that's why the keys are used for.
Thanks!