Yes. Load the image into an ImageIcon, and then call setIcon() on the JButton with that ImageIcon to have the image show up on it.
-Nate
-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Pratik Khetia
Ranch Hand
Joined: Jun 29, 2001
Posts: 50
posted
0
Originally posted by Nathan Pruett: Yes. Load the image into an ImageIcon, and then call setIcon() on the JButton with that ImageIcon to have the image show up on it.
-Nate
Yes it does show the image as an icon but I also want to display some text along with that and it doesnt do that .. Any idea...??? Pratik
subject: How to display an Image with the Text in a JButton ??