Picture Buttons
I am looking for a way to put a picture inside of a JInternalFrame and make it a button. The only ways I have found so far are to have hte button be a rectangle and then havea picture ico inside of it. I need the actual picture to be the button. Also I will need ot hardcode the button's position in the frame. Would I do that by first adding the button to the internal frame's content pane and then setting the postion?
Thanks.
[443 byte] By [
lesnaubra] at [2007-11-27 11:51:36]

For the picture, you can get rid of the rectangle button and just show the image by jButton.setContentAreaFilled(false);
jButton.setBorderPainted(false);
This will only show the icon you have chosen for the button.
You've been asked in the past to post Swing related questions in the Swing forum.
Add a button with an icon to a JInternalFrame is not different than adding a button with an icon to a JFrame or JDialog.
Read the Swing tutorial for examples.