import java.awt.*; import java.applet.*; import java.net.*; public class monimage extends Applet { Image best; public void init() { URL codeBase = getCodeBase(); best = getImage(codeBase, "best.gif"); resize(400, 500); } public void paint(Graphics g) { int width = best.getWidth(this); int height = best.getHeight(this); g.drawRect(5, 5, width+10, height+10); g.drawImage(best, 10, 10, width, height, this); } }