CSCI 4800/6800

Lecture Notes
Constructing a GUI Program
Jan. 16, 2007
Steps in constructing a GUI program:
  1. Choose applet or application (or both). For applications, create a container object. For applets, the applet is a container object.
  2. Select a layout manager : FlowLayout, BorderLayout, etc.
  3. Create GUI components (buttons, labels, Choice, etc.)
  4. Add the GUI components to their "container"
  5. Specify behavior of the components by implementing the methods of the appropriate listener interfaces.
  6. Add Listeners - that is, register the object(s) containing the methods to be invoked when related events occur.
Components: Containers: Interfaces/Adapters: Layout Managers: We looked at examples from chapters 13 and 14 of the Deitel "Java: How to Program" book, 5th edition. You can download the examples from the Deitel web site .

Also, you'll likely want to download your own copy of Java, see: The Java 2 Platform, Standard Edition

Finally, a good starting point for browsing and searching the online documentation is: the API specification