How to create an interactive link with GWT?

I want to make some clickable links with GWT. I am not sure if this is the best practice for this. Basically, I want something like this if I wrote html

<a href="index.html" alt="">Link</a>

+6
html gwt
source share
1 answer

Use Hyperlink if you want to “link to some place” in your application (this means that it fires a history change event).
Use Anchor if you want to set a link to the site of your application.

 Hyperlink link = new Hyperlink("link to foo", "foo"); //text would be "link to foo", would change your url to yourSite.html#foo Anchor anchor = new Anchor("Link to bar", "www.bar.com"); //text would be "link to bar", would redirect you to "www.bar.com" 
+12
source share

All Articles