4. GWT Web UI Class Library. The Web UI class library consists of
classes and interfaces to create User Interface (UI) components
(widgets) such as buttons and text fields.
4.3 Creating a GWT Application
The procedure to develop a GWT application is as follows.
1. Create a GWT application with the applicationCreator tool.
2. Modify the Java class to add UI components or other Java code.
3. Compile the Java class to JavaScript and HTML with GWT??™s JavatoJavaScript
compiler.
4. Run the GWT application.
The syntax of the applicationCreator command is as follows.
applicationCreator [-eclipse projectName] [-out dir]
[-overwrite] [-ignore] className
-eclipse specifies the Eclipse IDE project for the GWT application.
-out specifies the directory in which output files are generated. The default
is the current directory.
-overwrite specifies if existing files should be overwritten.
-ignore specifies that any existing files should be ignored, not overwritten.
-className specifies the front-end Java class for the GWT application.
The applicationCreator tool requires the final package of the
class from which a GWT application is created to be ???client???. Create an
example GWT application with the following command.
C:/GWT/gwt-windows-1.4.60>applicationCreator
com.gwt.client.CatalogForm
A GWT application gets created. The output from the
applicationCreator command is shown in Fig.
Pages:
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75