Learn GUI Programming in Java 1.1 or later

http://sol.pace.edu/java/gui (Paper on GUI Programming in Java 1.1)
http://csis.pace.edu/~bergin/papers/ModelViewController.html (Paper on Model-View-Controller in Java)
http://csis.pace.edu/~bergin/Java/javaevent.html (Introduction to Java Events)
http://csis.pace.edu/~bergin/patterns/event.html (Paper on using Java events)

Core Java (Horstman) has a lot on this also starting in Chapter 7 of Volume 1.
Java in a Nutshell is a reference to the Java libraries you need to build Java 1.1 GUI programs.
The Java Tutorial has some material on this also.

Java GUI programming is event driven. Here is a story to help you think about the nature of events in this model.

Look here for the fundamentals of events in Java.

Note, importantly, that GUI programming uses an event driven model. This is not especially difficult except for one place where it seems non-intuitive at first. Prompting a user for input and then getting that input must be done very differently in an event driven system. Remember that the program does not control the flow of actions in event driven programming. The user controls what happens and in what sequence. The program can put a prompt in a text field (for example), but it cannot expect to be able to pick up the response with the next statement to be executed. The system must capture the user's response at some later time when the user generates a new event after entering the response. Here is how to handle this problem.

The Model-View-Controller (MVC) idiom is a way to successfully build programs with complex GUIs. It is a way to decouple the functional elements (Model) from the way it looks (View) and how the user interacts with it (Controller). Here is the tutorial online. Here is a zip file tutorial and the associated files. Thanks to Eric Lunt of Digital Knowledge Assets for allowing us to use this.

 

Last Updated: February 15, 2000 8:13 PM