Java-Text Moving Animation

Program Program Source import java.applet.Applet; import java.awt.Graphics; import java.awt.Color; import java.awt.Font; public class Javaapp extends Applet implements Runnable{ private String msg = “123456789”; private Thread t; public void start() { t = new Thread(this,”Animation”); t.start(); } public void run() { for(;;) { try{ Thread.sleep(2000); }catch(InterruptedException ex){} msg +=msg.charAt(0); msg = msg.substring(1,msg.length()); repaint(); } } public … Read more…

Java-Circle and Color

Circle The Graphics class does not have any method for circles or ellipses. However, the drawOval( ) method can be used to draw a circle or an ellipse. Ovals are just like rectangles with overly rounded corners. The drawOval( ) method takes four arguments, the first two represent the top left corner of the oval … Read more…

Java-Applets

Applets Applets are small java programs that run inside a web browser. The byte code for an applet is stored as part of a web page that is made available on a web server. When we download such a web page, the applet contained in it is also downloaded and executed by the web browser. … Read more…