This example describes the Basics for building the Hyperlink using GWT. The steps involved in Building the Hyperlink are described below:-
private Label label = new Label()
Here we are declaring label. Label is a widget that
contains text.
Hyperlink link0 = new Hyperlink("Delhi",
"Delhi")
Creating Hyperlink object named 'link0'. Hyperlink is a class or a widget that serves as an "internal" hyperlink
VerticalPanel panel = new VerticalPanel()
Creating Vertical panel. Vertical panel is a class
that lays all of its widgets out in a single vertical column.
panel.add(label)
This is the method of class Vertical panel. By
using this method we added a label to the Panel
History.addHistoryListener(this)
History is a class that allows us to interact with the browser's history stack.
addHistoryListener() is a method of this class to adds a listener to the browser's history
stack.
HyperLinkExample.java
|
Main.gwt.xml
|
Output of the program

|
Recommend the tutorial |
Ask Questions? Discuss: Creating Hyperlink using GWT View All Comments
Post your Comment