Næste |
|
Java i netværk serie, Planche nr. 5 |
![]() |
Billeder |
gif-filer og jepg-filer kan læses direkte via URL fra en applet.
getImage()
metoder:
public Image getImage(URL url)
public Image getImage(URL url, String name)
OBS!
Only applets can use the Applet
getImage()
methods.
Moreover, the Applet getImage()
methods
don't work until the applet has a full context (AppletContext).
For this reason, these methods do not work
if called in a constructor
or in a statement that declares an instance variable.
You should instead call getImage()
from a method
such as init()
.
Næste