[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: one more q



To add an image(jpeg/gif) to any component(frame in your case), do
something on the lines of ...

<CODE>
Image jpegImg = null;
Graphics fg = frame.getGraphics();


                jpegImg = getImage(new
URL("http://www.wherever.com/image.jpg";));
     
                fg.drawImage(jpegImg, topLeftX, topLeftY, width,
height);

</CODE>

You can add the image to a canvas, and the canvas to the frame and use
the standard LayoutManagers to lay out your frame.
You could also use MediaTracker to take care of slowly downloading
images off the net (if that is your case).

HTH,
Rohit