View Single Post
  #1 (permalink)  
Old 03-20-2008, 07:43 PM
pcman pcman is offline
Member
 
Join Date: Mar 2008
Posts: 2
pcman is on a distinguished road
the code dosent work
i try to do a animation....
all 10 minutes i need to repaint and drew the oval again after some of time
i think the problam here
Code:
t.sleep( 1000 );
the code:
Code:
import java.applet.*; import java.awt.*; public class ok extends Applet implements Runnable { int y; Thread t = null; public void paint(Graphics g) { while(y > 500) { g.fillOval(100, y, 50, 50); y = y+10; t.sleep( 1000 ); repaint(); } } }
Reply With Quote
Sponsored Links