Sponsored Link •
|
Advertisement
|
Advertisement
|
This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.
Message:
OK, I'm learning java and reading a book on it, by the time I get a reply to this the problem may be solved BUT here goes.. This is just a simple Applet that draws out a 160x160 RED/BLACK checkerboard. However my problem is that I run it on the web page and it just comes up blank(gray). See if you can tell me why this isn't working or what I could do to fix it :) thanks The source is: import java.applet.*; public class CheckerBoard extends Applet { public void paint(Graphics g) { int yIn; // The distance from left yIn = 0; while ( yIn <= 160 && xIn <= 160 ) { if ( xIn == 0 || xIn == 40 || xIn == 80 || xIn ==120 ) { for ( yIn = 0 ; yIn <= 160 ; yIn += 20 ) { else { for ( yIn = 0; yIn <= 160 ; yIn += 20 ) { xIn +=20; }//end Parent While } //end paint(Graphics) Replies:
|
Sponsored Links
|