public drawImage(Image img, int x, int y, ImageObserver observer) This directory also contains the applet code. This image file named name is present in the directory location specified by url. This method gets the image file in the form of Image object. public Image getImage(URL url, String name) Using this object of URL class, we can get and load any image file present in the same directory using the next two methods. This location is returned to us in terms of an object of URL class. ![]() This method gives us the location of the directory in which our applet code file is located. ![]() To perform these operations, we are going to use three methods -: In this article, we will show you how to load an image or draw different shapes like an oval, rectangle and a line in an applet.
0 Comments
Leave a Reply. |