A popular of use of Java since its inception has been the creation of applets. Applets are the "other" way of running Java programs: they do not have a main methods because the browser inside which they run has one instead. Applets are also special in the sense that they are "panels", whereas Java programs that are not applets do not extend java.applets.Applet.
This article focusses on one of the more interesting and popular aspects of writing applets-animation. This typically means talking an object (text and/or graphics) and moving it on the screen. We will write a Java program that displays a "banner" in a browser. The code will include some aspects of programming with the AWT, and I'll provide pointers of how to write applets. This applet also demostrates the use of "threads" to do animation.
© 2001-2024 Fundación Dialnet · Todos los derechos reservados