Problem running applet, .hotjava missing!?
I am new to Java, and have written an applet that will generate squares with colors that are randomly generated. However, I get the following error: .hotjava/properties missing.
I am guessing that this is a problem with directories or something, but is it with the code by chance? Here is what I wrote:
Code :
import java.awt.Graphics;
import java.awt.Color;
public class count extends java.applet.Applet {
public void paint(Graphics g) {
int rval, gval, bval;
for (int j = 30; j < (this.size().height -25); j += 30)
for (int i = 5; i < (this.size().width -25); i += 30) {
rval = (int)Math.floor(Math.random() * 256);
gval = (int)Math.floor(Math.random() * 256);
bval = (int)Math.floor(Math.random() * 256);
g.setColor(new Color(rval,gval,bval));
g.fillRect(i, j, 25, 25);
g.setColor(Color.black);
g.drawRect(i - 1, j - 1, 25, 25);
}
}
}
All help is appreciated, thank you in advance!
Re: Problem running applet, .hotjava missing!?
Should that method have a different name? pain seems odd for an Applet
Re: Problem running applet, .hotjava missing!?
It was supposed to be paint.