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 developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

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:  9704 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



Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

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=

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere).

My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Try IBM PureSystems. No charge.