I have an Image object that I would like to convert to an Icon or ImageIcon to add to a JTextPane. How would I go about doing this? (this is in JAVA)
clarification: my "Image" is an instance of the Image Object, not a File.
I have an Image object that I would like to convert to an Icon or ImageIcon to add to a JTextPane. How would I go about doing this? (this is in JAVA)
clarification: my "Image" is an instance of the Image Object, not a File.
convert image to icon, for example set Icon to a jLable in netbeans, i use below code to make it true:
JLabelname.setIcon(new javax.swing.ImageIcon(getClass().getResource("/slip/images/null_phot.png")));