Jun 10, 2002 #1 bos Technical User Joined Oct 1, 2002 Messages 50 Location US I have a jbutton with an imageicon. I'd like the image to change when the button is clicked. How do I put in the new image? Thanks in advance.
I have a jbutton with an imageicon. I'd like the image to change when the button is clicked. How do I put in the new image? Thanks in advance.
Jun 11, 2002 #2 AdamRice32 Programmer Joined Dec 31, 2001 Messages 38 Location US Hi bos, Check out the setIcon() method of JButton's superclass, javax.swing.AbstractButton. This should do the trick. Best, Adam Rice Upvote 0 Downvote
Hi bos, Check out the setIcon() method of JButton's superclass, javax.swing.AbstractButton. This should do the trick. Best, Adam Rice