Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2018
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. import java.util.TimerTask;
  2.  
  3. public class MyTimerTask extends TimerTask
  4. {
  5. @Override
  6. public void run()
  7. {
  8. for(int i=1;i<Okno.planets.size();i++){
  9.  
  10. double c=Okno.planets.get(i).getPosition();
  11. double t = Okno.planets.get(i).getTerm();
  12. Okno.planets.get(i).setPosition(c+365/t*0.4);
  13. //System.out.println(Okno.planets.get(i).getPosition());
  14. Okno.panel.repaint();
  15.  
  16. }
  17.  
  18. }
  19.  
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement