kimo100
asked on
handling picture within a frame
how can i show and hide a picture(like a tringle which contain an exclamation mark)
in a frame which contains a group of radiobutton at selecting
one of these radiobutton.
the symbol must be shown in front of the radiobutton.
thanks
in a frame which contains a group of radiobutton at selecting
one of these radiobutton.
the symbol must be shown in front of the radiobutton.
thanks
hmmm....
>"the symbol must be shown in front of the radiobutton."
...what do you mean by this exactly? :o\
[r.D]
>"the symbol must be shown in front of the radiobutton."
...what do you mean by this exactly? :o\
[r.D]
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi V,
to save you the decission; award sciuriware with the points, please. :-)
[r.D]
to save you the decission; award sciuriware with the points, please. :-)
[r.D]
I'm honoured.
ImageIcon imgIc = new ImageIcon( "image.gif" );
JButton jb = new JButton( imgIc );
jb.setSize( x, y );
jb.setBorderPainted( false );
Then, when they select the radiobutton, it gets the image name from an array, and uses this to replace it:
imgIc = new ImageIcon( "NewImage.gif" );
jb = new JButton( imgIc );
repaint();
I think that should do it -- what do you think?? :-)
[r.D]