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++); 

1 comment:

  1. Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging. If anyone wants to become a Front end developer learn from Javascript Training in Chennai . or learn thru JavaScript Online Training in India. Nowadays JavaScript has tons of job opportunities on various vertical industry. JavaScript Training in Chennai


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