Hi,

You can also use a com.google.gwt.user.client.ui.PushButton that have a
constructor with 2 images as parameter.

Alexandre.

2011/4/5 Zak Linder <[email protected]>

> Hi Arilene-
>
> You need to set the original image with a MouseOutHandler as well.
>
>
>         img_p1.addMouseOverHandler(new MouseOverHandler() {
>
>             @Override
>             public void onMouseOver(MouseOverEvent event) {
>                 img_p1.setImage("img", "/icons/grafo.png");
>             }
>         });
>
>         img_p1.addMouseOutHandler(new MouseOutHandler() {
>
>             @Override
>             public void onMouseOut(MouseOutEvent event) {
>                 img_p1.setImage("img", "/icons/grafo1.png");
>             }
>         });
>
> Since you might want to do this often, it might make sense to make your own
> "HoverHandler":
>
> public interface HoverHandler extends MouseOverHandler, MouseOutHandler {}
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to