30
Sep
Figure 2-2 Rectangle boogie This boogie action is
case RIGHT: locx += 2; if (locx >= 90) { state = LEFT; } break; case LEFT: locx -= 2; if (locx <= 70) { state = DOWN; } break; } } public void run() { while (true) { repaint(); updateRectangle(); try { Thread.sleep (REFRESH_RATE); } catch (Exception exc) { }; } } public void stop() { System.out.println(">> stop <<"); if (animation != null) { animation.stop(); animation = null; } } } Previous Table of Contents Next
Note: If you are looking for cheap and inexpensive provider to host and run your tomcat application check Actions tomcat hosting services
