// Código fuente Spots import java.awt.Graphics; import java.awt.Color; import java.awt.Event; import java.awt.Image; public class Spots extends java.applet.Applet { Image hombre; Image cartelito; final int MAXSPOTS = 10; int xspots[] = new int[MAXSPOTS]; int yspots[] = new int [MAXSPOTS]; int currspots = 0; int test; public void init(){ setBackground(Color.white); hombre= getImage(getCodeBase(), "Moto1.jpg"); cartelito= getImage(getCodeBase(), "Moto2.jpg"); } public boolean mouseDown(Event evt, int x, int y){ if (currspots < MAXSPOTS){ addspot(x,y); test=1; return true; } else { test=0; currspots=0; return false; } } void addspot(int x, int y) { xspots[currspots]=x; yspots[currspots]=y; currspots++; repaint(); } public void paint(Graphics g) { g.setColor(Color.blue); for (int i=0; i