Thursday, October 11, 2012

moving banner using Applet class and Runnable Interface


Step 1:Create a java source file with name Movingb.java that is name of java class and it is mandatory that classname and filename must be same.
Applet class must be public.
In java source file commented applet code will not be compile by java compiler but will executed by AppletViewer.

Step 2: Run cmd(command prompt) and compile java source file, Movingb.class file'll be build.

then give appletviewer command and applet will pop out.
paint() is a method of java.awt.Component class which is a child of java.lang.Object class and parent of java.awt.Container class
Download Code Link 1
Download Code Link 2
output:

No comments:

Popular Posts