Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your profile (name, country/region, and company) is displayed to the public and will accompany any content you post. You may update your IBM account at any time.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

Build Web apps with ThinWire and Java code, Part 1: Manage Web app layout

Dynamically change the layout of a ThinWire GUI based on the current size of the Web browser window

Professor Richard G Baldwin (baldwin@dickbaldwin.com), Professor of Computer Science, Austin Community College

Richard Baldwin is a college professor (at Austin Community College in Austin, Texas) and private consultant whose primary focus is a combination of Java, C#, and XML programmin. With 32 years of industry experience and 12 years of teaching experience, he has concentrated on teaching a full load of Java and OOP programming classes since 1997.

Richard has participated in numerous consulting projects and frequently provides onsite training at the high-tech companies located in and around Austin. He is the author of Baldwin's Programming Tutorials, which have gained a worldwide following among experienced and aspiring programmers.

In addition to his programming expertise, Richard has many years of practical experience in Digital Signal Processing (DSP). He began his career doing DSP in the Seismic Research Department of Texas Instruments. In the following years, he applied his programming and DSP expertise to other interesting areas, including sonar and underwater acoustics.

Richard holds an MSEE degree from Southern Methodist University and has many years of experience in the application of computer technology to real-world problems.

Summary:  With ThinWire, an open source development framework, you can build Web applications that look and feel like desktop applications. In this five-part series of tutorials, you'll learn how to develop rich Web applications using ThinWire and Java™ programming. In Part 1, you begin the process and learn how to deal with user interface layout issues in ThinWire. You will discover in this tutorial that providing dynamic layout management using the ThinWire framework is a relatively easy thing to do.

View more content in this series

Date:  05 Dec 2006
Level:  Intermediate PDF:  A4 and Letter (549 KB | 38 pages)Get Adobe® Reader®

Activity:  12457 views
Comments:  

Before you start

Historically the development of Web applications has been a complex process. This is due mainly to the requirement of learning and using a variety of technologies, possibly including HTML, JavaScript, XML, ASP.NET, Java servlets, various scripting languages, and so on. Recently several emerging products make it possible to develop Web applications in the Java development environment. Some use Java programming exclusively, while others use Java programming selectively.

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 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.

About this series and tutorial

This is one in a series of lessons designed to teach you how to develop rich Web applications using ThinWire and Java code. This first lesson is designed to help you learn how to deal with user interface issues in ThinWire.

The earlier lesson titled "Developing Ajax Web Applications using ThinWire and Java" (see Resources) was designed to help you begin to develop Web applications using the ThinWire framework.


Objectives

The objective for Part 1 is to learn a programming technique that can be used to dynamically change the layout of a ThinWire GUI based on the current size of the Web browser window. The layout is updated 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 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 Resources).

System requirements

First, download and install the ThinWire framework (see Downloads).

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 Downloads and also see "Getting Started with Jakarta Tomcat, Servlets, and JSP" in Resources).

Third, download Sun's Java Development Kit (see Downloads).

1 of 12 | Next

Comments



static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Web development, Java technology
ArticleID=486810
TutorialTitle=Build Web apps with ThinWire and Java code, Part 1: Manage Web app layout
publish-date=12052006
author1-email=baldwin@dickbaldwin.com
author1-email-cc=