Link to home
Create AccountLog in
Avatar of hipal
hipalFlag for United States of America

asked on

Displaying images as Jbutton

Hi All,

Can someone please suggest how can I make my images to be a button?

I am trying to show just an image and no borders etc. and want it to work as button.

Thanks!
Avatar of hipal
hipal
Flag of United States of America image

ASKER

I am not trying to display a picture in JButton but trying to make an image itself a button.
ASKER CERTIFIED SOLUTION
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of hipal

ASKER

Can you please give a very simple example overriding paintCOmponent to replace a circle as a button.

Hope I am not asking for too much. It that needs too much code, please ignore ..

thank you !
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account