import java.applet.Applet; import java. awt.*; public class RandomActsofPictures extends Applet { Image action; public void start(){ int rint = (int)(Math.random() * 3); System.out.println("var=" + rint); if(rint == 0){ System.out.println("var=" + rint); action = getImage(getDocumentBase(), "../Images/1bee.jpg"); } else if(rint == 1){ System.out.println("var=" + rint); action = getImage(getDocumentBase(), "../Images/2bees.jpg"); } else { System.out.println("var=" + rint); action = getImage(getDocumentBase(), "../Images/3bees.jpg"); } } public void paint(Graphics graph) { graph.drawImage(action, 10, 50, this); resize(300,300); } }