Various solutions have been proposed to the problem of introducing GUI programming into the computer science curriculum. One solution is to let students write GUI programs in a proprietary language like Microsoft's Visual Basic or Borland's Delphi. Another is to develop simplified libraries that shield students from the complexity of a commercial GUI application interface [10, 16]. The alternative--asking students to write in C++ and master the Microsoft Foundation Classes (MFC) or Borland's Object Windows Library (OWL)--is difficult, and students won't progress with any speed [15].
Java changes all that. Java comes with a platform-independent windowing API, known as the Abstract Windowing Toolkit (AWT). Java's AWT is remarkably easy to use. A simple component, such as a button, can be created and added to the screen in one statement. Handling an event (such as that triggered when the button is pressed) isn't much harder. Using AWT, students can write GUI programs with ease, and their programs will run on a variety of platforms. Once they're familiar with the event-driven nature of GUI programming and the basic components from which GUI programs are built, they'll be better prepared to tackle the complexities of MFC or OWL in a subsequent course.
AWT supports not just GUI components, but graphics and sound as well. The advantages of using graphics in introductory classes are well documented [12]. With Java, it's easy for beginners to incorporate graphics, animation, and sound in their programs.
© 1997 ACM