Rotating Ganapati Chakra

Ganapati Chakra

1) Copy this code into a notepad and save file with name
2) Compile the program on command prompt: javac 
3) Run using Appletviewer

import java.awt.*;
import java.applet.*;
<applet code=Chakra.class height=220 width=250>

public class Chakra extends Applet
   public void paint(Graphics g)
     g.drawString("Applet Magic by KK",100,10); 
     int x,y,i,a,r,g1,b;
       g1=(int)(Math.random()*255); b=(int)(Math.random()*255);
       g.setColor(new Color(r,g1,b));
for(double j=0;j<5155555;j++); 

No comments:

Post a Comment

Thanks for visiting my Blog!

Have a Question ? Need Help in College Assignments, Need Code that is not available here? Just leave a comment & get your code instantly.

Tips to Enhance Your Blog