So I am trying to make this java applet that will display a random image of three that is a sub folder of my src folder within my project.
When you run the project currentlt all you get is a white applet. Here is the code:
import java.applet.Applet; import java. awt.*; public class myPictures extends Applet { Image action; public void paint(Graphics g){ int rint = (int)(Math.random() * 3); if(rint == 0){ action = getImage(getDocumentBase(), "../../images/bee3.jpg"); } else if(rint == 1){ action = getImage(getDocumentBase(), "../../images/bee1.jpg"); } else { action = getImage(getDocumentBase(), "../../images/bee2.jpg"); } } }