|
No I dont need it to be precise, I just need to be able to move a JPanel somewhat smoothly.
The sleep loop works fine itslef but the JPanel isnt being moved while the loop is going, it only moves before and after the loop, it goes from x=0 to x=100 instead of x=1,x=2,x=3,x=4,x=5,x=6 and then moving.
I tried panel.repaint(), frame.repaint(), validate() and a bunch of other stuff but it still doesnt work.
I also tried creating a blank jFrame/class with just a JFrame and a JPanel to move but it had the same result.
|