Level: Intermediate Professor Richard G Baldwin (baldwin@dickbaldwin.com), Professor of Computer Science, Austin Community College
03 Jan 2007 With ThinWire, an open-source development framework, you can build Web applications that look and feel like desktop applications. In this five-part series, you'll learn how to develop rich Web applications using ThinWire and Java. In Part 2, you learn to use the SplitLayout class in conjunction with your own layout management code to dynamically change the layout of a ThinWire GUI based on the current size of the Web browser window.
In this tutorial
This is one in a series of lessons designed to teach you how to develop rich Web applications using ThinWire and Java code. As you learned in Part 1, the open-source development framework ThinWire allows developers to use Java code exclusively for the development of Web applications. In Part 2, you'll learn how to use the SplitLayout class in conjunction with your own layout management code to dynamically change the layout of a ThinWire GUI based on the current size of the Web browser window. ThinWire provides two layout managers, neither of which bear any resemblance to the layout managers provided by standard Java programming. The two layout managers provided by ThinWire are implemented by the SplitLayout and VisibleLayout classes. You'll learn how to use the SplitLayout class
in this tutorial and how to use the VisibleLayout class in a future tutorial. One development environment that allows you to use Java programming exclusively for the development of Web applications is an open-source development framework named ThinWire (see Resources in the tutorial for more information). All of the code for a ThinWire Web application is written in Java code just as though it is a standalone, event-driven program designed to run on the desktop. It is then compiled into a Web application by the ThinWire framework using the standard Sun javac compiler. A special compiler provided by another vendor is not required.
Objectives - Use the SplitLayout class in conjunction with your own layout management code to dynamically change the layout of a ThinWire GUI based on the current size of the Web browser window
- Update the layout each time the user manually changes the size of the browser window
Prerequisites
You will need:
- Knowledge of event-driven programming using the Java programming language as
embodied in Sun's J2SE 5.0 (see DickBaldwin.com in the tutorial's Resources).
- Knowledge of how to deploy a Web application in a Java servlet container (see
"Deployment of Web Applications in Jakarta Apache Tomcat 5" in the tutorial's Resources).
System requirements
You will need JavaScript enabled in your browser. First, download and install the ThinWire framework (see Download in the tutorial). Second, you will need access to a servlet container to test your Web
applications. The easiest way to do this is to install a servlet container as a
localhost server (see Download and also "Getting Started with Jakarta Tomcat, Servlets, and
JSP" in Resources in the tutorial). Third, download Sun's Java Development Kit (see Download in the tutorial).
Duration
1 hour
Formats html, pdf
|