> List of tutorials

Table of contents for this tutorial

Base lesson 2, step 1: GUI-Design

For this document and all references (links) please obey the hints and regulations concerning copyright, disclaimer and trademarks.

Last revision of this document:
2006-02-10

This step of the tutorial deals with the set-up of a project in Eclipse and the design of the GUI (Graphic User Interface).

Preface:

The code written in this tutorial is far away from being optimized.
Emphasis of this tutorial is to develop the application in small steps where the completion of each step allows the application to be run eror-free and showing the result aimed by the step.
Therefore the code is written to be understandable in favor of being optimized
.

Credits:

A reference of the elements for the GUI in JAVA can be found under http://java.sun.com/docs/books/tutorial/uiswing/layout/gridbag.html .

Prerequisites:

Preparation:

Create a new project (named JS_Base02) in Eclipse:

top.

Create and code the Class for the GUI:

The code responsible for the GUI-part is the class we start with.
N.B.:
1.) To separate the code for actions and for handling events (explanation follows later) two more classes are created later.
2.) The Visual Editor offers several templates for GUI-Styles. To explain the creation of each GUI-element this element is developed 'from scratch' without selecting a template.

In the following explanations all new code is written in bold letters.
Code generated by the template or entered in previous steps (old code) is in italics.
Larger blocks of old code may be skipped.

Next Step: