well the class ImageIcon, which implements Icon, can take an Image object as its constructor.<br><br>If you have an ImageIcon, and you want an Image, invoke the method getImage() .. Hope that helps. <p>Liam Morley<br><a href=mailto:lmorley@wpi.edu>lmorley@wpi.edu</a><br><a href=
did this on my latest project, it looks pretty neat code:<br><br>class Proj6Frame extends JFrame<br>{<br>setTitle("Project6 by Tom Moses"<br><br>//this allows you to import a new image and it links it to the icon<br>//image<br>Image img = tk.getImage("cursor.gif"<br>setIconImage(img);<br><br>//setting a custom cursor needs to set the try catch so if the image is not their <br>//the mouse will still appear<br><br>setCursor(tk.createCustomCursor(img,new Point(0,3),"Starcraft");<br>}<br><br>in the JFrame class you can call these functions, good luck<br><br> <p>moses<br><a href=mailto:tmoses@iname.com>tmoses@iname.com</a><br><a href=
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.