i am in programming class trying to make an applet involving random placement of colored blocks, but an error is created when i try to run it saying "no method named "random" was found in type "Math". "
i have imported java.awt like so:
import java.awt.*;
and this is the random number statement:
g.fillRect((int )(Math.random() *getSize().widt h),(int)(Math.r andom()*getSize ().height),20,2 0);
any help you can provide will be greatly appreciated
i have imported java.awt like so:
import java.awt.*;
and this is the random number statement:
g.fillRect((int )(Math.random() *getSize().widt h),(int)(Math.r andom()*getSize ().height),20,2 0);
any help you can provide will be greatly appreciated
Comment