Wednesday, July 13, 2005

about getImage() method

When use the method of Applet: getImage(), add the applet to a frame, and show a instance of the frame, if run it as application, it will show errors. We can use Toolkit.getImage() to replace Applet.getImage(). Also, the method of applet: getCodeBase() only can be used in applet(because getCodebase() is the URL of the applet itself), if add the applet with getCodeBase() to a frame, when run the instance of the frame as a application, it will show errors.

No comments: