Sorry, for double posting, already posted this question once, but I realized I weren't explicit enough. I still haven't managed to find an answer to my question so I'll try to better describe my problem here:
I have the following classes:
public class Paddle extends JLabel {}
public class Canvas extends JPanel implements Runnable {}
Now, when I start the thread described in Canvas, I want an infinite loop (loops while program is exited). In this loop I've got a DIRECTION variable. When the left arrowkey is pressed I'd like this to be set -1. If right arrow key is pressed I'd like +1 to be it's value. If neither of the above cases is true, it's value should default 0.
I hope I was more explicit this time. If not please tell.