Retrieve Image JDBC

Retrieve Image JDBC

In the previous code XXXXXX, an image of juggler.gif is inserted in the table marriage. In this program let us read and print. To print, either Frame or Applet window is required.

Here, Retrieve Image JDBC, Frame is used.

Reading the image and printing is a round about process. First image is read from the table and written to a file, Temp.txt. From the file again it is read and displayed on the frame.

g.drawImage(img1, 50, 100, this);

img1: Image to be drawn. The first parameter of drawImage() method is an object Image class.

50, 100: These are x and y coordinates on the frame where image is to be drawn.

this: "this" is an object of ImageObserver which will take care of the image while writing because image will not be written at a time(written step by step).

Leave a Reply

Your email address will not be published. Required fields are marked *