Re: Really easy Graphics2D question
- From: Peter MacMillan <peter@xxxxxxxxxxxxx>
- Date: Fri, 29 Apr 2005 23:59:54 -0400
.. 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 .
- References:
- Really easy Graphics2D question
- From: .
- Really easy Graphics2D question
- Prev by Date: Really easy Graphics2D question
- Next by Date: Re: TextArea and mouse pointer
- Previous by thread: Really easy Graphics2D question
- Index(es):