BreezyGUI is easy to use, and this tutorial will get you off to a quick start. The tutorial makes the assumption that you are already familiar with the basics of Java and that you know how to write, compile, and run simple Java programs using classes you have designed yourself. However, you do not need to know anything about creating GUIs. That is the purpose of this tutorial.
Here, in addition to learning BreezyGUI's powerful but simple features, you will explore general principles for constructing GUI based applications. These include:
Constructing interfaces that use labels, data entry fields, radio buttons, check boxes, list boxes, command buttons, and menus.
Using dialogs.
Writing applications that provide multiple windows or views of an underlying model.
Drawing simple graphics.
Responding to mouse events.
Nearly everything you learn will apply directly to Java's Abstract Windowing Toolkit (AWT), the ultimate and complex official tool for creating GUI applications in Java.
If you find your knowledge of Java inadequate to the demands of the tutorial, you might consider obtaining the textbook Java: A Framework for Programming and Problem Solving by Lambert and Osborne. This book, which can be purchased online at www.amazon.com, is written for the beginning programmer and introduces Java and BreezyGUI simultaneously.
The material in the tutorial is extracted with some modification from
Java: A Framework for Programming and Problem Solving and
Java: a Framework for Program Design and Data Structures
with the permission of Brooks/Cole Thomson Learning. See the legal stuff for rules governing your use of this material.
| I. Core material -- After reading this material you will know enough about BreezyGUI to use it in a wide range of applications. So its OK to stop here and start enjoying the benefits of doing things the GUI way. | |
| A first BreezyGUI program | A first look at BreezyGUI using a simple temperature conversion program. |
| The Breezy Skeleton | The basic structure of all BreezyGUI programs. A similar structure exists for applets and dialogs. |
| Doing it the AWT way | For the sake of comparison the temperature conversion program is rewritten using the native AWT. If you are not an experienced Java programmer, you will find this material incompressible, so do not hesitate to skip it. |
| Laying out window controls | How to lay out an interface in BreezyGUI and properties of some of the basic window controls. |
| Messages and methods for window controls | Programs manipulate controls by sending them messages. In this section we present methods for manipulating several basic classes of controls. |
| 2. Applets -- BreezyGUI works equally well for creating applets as it does for creating stand alone applications. | |
| Applets | An applet is a Java program that is download with a web page and runs inside a browser window. Applets can add a great deal of useful functionality to a website. |
| 3. More controls and other features -- BreezyGUI supports the creation of fairly sophisticated user interfaces. Read this material when you are ready to add more power, interest, and flexibility to your interfaces. | |
| Message boxes | Displaying simple pop up messages. |
| Text fields and text areas | Using single and multiline text controls. |
| Formatted output | Justify information in a string before outputting it to the user. |
| Menus and titles | Adding drop down menus and titles to an application. |
| Lots more controls | Demonstration of checkboxes, radio buttons, scrolling lists, and choice lists. |
| 4. Digression on software engineering -- Read this when you are ready to write large programs. | |
| The model/view pattern | Structuring large programs so that there is maximum independence between the graphical user interface (the view) and the underlying application (the model). |
| 5. Graphics and mouse events -- Graphics opens up a whole new world of applications. | |
| Simple graphics | Drawing in BreezyGUI windows. |
| Mouse events | Responding to mouse events. |
| 6. Dialogs and multiple windows -- Dialogs and multiple windows add flexibility and power to the user interface. | |
| Dialogs | Using BreezyGUI to create modal dialogs. |
| Applications with multiple windows | Larger applications often require the use of multiple windows or view on an underlying model. |
| 7. Features for terminal input -- Terminal I/O will never go away completely, but it can be made a little easier. | |
| Terminal Input | Doing rudimentary terminal input is annoyingly complicated in Java and involves features that are perplexing to beginning programmers. BreezyGUI provides a class with several methods to simplify the input of data from the keyboard. |