Re: Really easy Graphics2D question



.. wrote:
Hi all,

I've drawn an image using Graphics2D, but I need to use it as an Icon.

How can I do this? I've currently got the image as a BufferedImage, but I can't work out how to get this to be an Icon object.

Thanks for your help

Regards

Michael



Would the ImageIcon(Image image) constructor of javax.swing.ImageIcon class be what you want? (BufferedImage is an extension of Image).


http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/ImageIcon.html

--
Peter MacMillan
e-mail/msn: peter@xxxxxxxxxxxxx
.