Chapter 13: Introduction to GUI

"The cow was outstanding in her field." —Unknown

Introduction

In this chapter we will look at what Java has to offer with its built-in GUI packages AWT and Swing and how we can use them, abuse them, and then disown them. We will also learn to create our own GUI system to get around the frailties of the Java GUI system.

GUI is sometimes overlooked in game development, but every game really requires a GUI system. As you may know already, GUI is an acronym for graphical user interface and is the general name for all the widgets, such as buttons and scroll bars, that are commonly found in a windowed environment.

Java's GUI system is very well designed and easy to use, which makes it an excellent choice for creating game tools such as map editors and the like. But when it comes to games programming, we require complete control over everything and because of the way Java is structured, using the Java GUI does not allow us complete control, which we will discuss through the course of this chapter.

First though, let's look at how we can implement a couple of the Swing GUI components (check back to Chapter 8, "Applications and Applets," to find out more about Swing).



Java 1.4 Game Programming
Java 1.4 Game Programming (Wordware Game and Graphics Library)
ISBN: 1556229631
EAN: 2147483647
Year: 2003
Pages: 237

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net