I am trying to do a simple java applet which loads image from a specified url.
Here is the code I have now, but it cant seem to work.
Expand|Select|Wrap|Line Numbers
- import java.applet.*;
- import java.awt.*;
- public class ATestofLoadImage extends Applet {
- Image image;
- public void init() {
- // Load image
- image = getImage(getDocumentBase(), "http://127.0.0.1:8550/epe/map/render?name=Tag%201");
- }
- public void paint(Graphics g) {
- // Draw image
- g.drawImage(image, 0, 0, this);
- }
- }
What might be the problem?
Thank you for your help.