Take the 2-minute tour ×
private ImgButton button = new ImgButton();



GWT or SmartGWT, I cannot tell exactly, generate state word to concatene it on the name of file.

Example to clarify :

  • On focus, iconName.jpg become iconName_Focus.jpg
  • On mouse down click, iconName.jpg become iconName_Down.jpg
  • On over, iconName.jpg become iconName_Over.jpg

Because these images are custom images, I want to tell GWT to take a default image when I didn't provide the corresponding image.

For example, when over event is fire and iconName_Over.jpg does not exist then use iconName.jpg.

share|improve this question

1 Answer 1

up vote 0 down vote accepted

Use the setShow{State} or setShow{State}Icon methods accordingly. For example for disabling the mouse down state, use setShowDown(Boolean.FALSE). For not showing a different icon when the mouse goes down on the button, use the setShowDownIcon(Boolean.FALSE). The rest of the actions have accordingly named methods you can look up at the ImgButton's javadoc page.

share|improve this answer

Your Answer


