1 2 import java.awt.*; 3 import java.applet.*; 4 import javax.swing.*; 5 6 public class JavaAppDe extends JApplet { 7 8 public void init() { 9 } 10 11 public void paint (Graphics g) { 12 super.paint(g); 13 int base = 0; 14 while(base<255) { 15 g.setColor(new Color(base,base,base)); 16 g.drawLine(0,base,255,base); 17 base++; 18 } 19 } 20 }
You need to create an account or log in to post comments to this site.
I think there is a better and easier solution :
Have Fun,
Krafi