I want to make some clickable links with GWT. I'm not sure if this is the best practice for it. Basically I want something that similar like this if I would've written with html
<a href="index.html" alt="">Link</a>
Use a Hyperlink if you want to "link to some place" in your app (meaning it fires a History change event).
Use an Anchor if you want to link to a site ouside of your app.
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"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With