gwt.CatalogForm
The Run Directory is the same as for the hosted mode as shown in Fig.
4.11. Click on OK in the Edit Run Configuration window and the
Project Properties window.
4.3 Creating a GWT Application 73
Fig. 4.11 Web Mode Run Configuration
Next, we shall run the GWT application in web mode. Right-click on
the GWT web project and select Run as shown in Fig. 4.12.
Fig. 4.12 Running GWT Application in Web Mode
74 4 Ajax with Java-GWT
The CatalogForm.java class gets compiled into HTML and JavaScript.
The output from the compilation is copied to the C:\GWT\gwt-windows-
1.4.60\www\com.gwt.CatalogForm directory as shown in Fig. 4.13.
Fig. 4.13 Output from GWTCompiler
To run the GWT application open the
www/com.gwt.CatalogForm/CatalogForm.html in a browser. The output is
the same as for the hosted mode as shown in Fig. 4.14.
Fig. 4.14 GWT Application in Web Mode
Click on the button and a ???Hello World??? message gets displayed, same
as for the hosted mode as shown in Fig. 4.15.
4.4 GWT Class Libraries 75
Fig. 4.15 Testing GWT Application in Web Mode
4.4 GWT Class Libraries
GWT provides various class packages for user interface classes and utility
classes. GWT applications consist of widgets contained in panels. Widgets
are user interface components such as buttons and labels. Panels such as
DockPanel and HorizontalPanel are containers that layout the
user interface components.
Pages:
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82