I får lige hele koden, so far(Hvis det kan hjælpe).
import java.applet.Applet;
import java.awt.*;
import java.net.*;
import java.io.*;
public class Menu extends Applet {
private Image news, shop, links;
public void init() {
news = getImage(getDocumentBase(), \"news.jpg\");
shop = getImage(getDocumentBase(), \"shop.jpg\");
links = getImage(getDocumentBase(), \"links.jpg\");
}
public boolean mouseDown (Event event, int x, int y) {
if (x>=0 && x<=100 && y>=0 && y<=40) {
// news button pushed
// this.getAppletContext().showDocument(\"
http://www.jubii.dk\");
// this.getAppletContext().showDocument(\"
http://www.jubii.dk\", \"_main\");
}
repaint();
return true;
}
public void paint (Graphics g) {
g.drawImage(news, 0, 0, 100, 40, this);
g.drawImage(shop, 0, 40, 100, 40, this);
g.drawImage(links, 0, 80, 100, 40, this);
}
}