|
|
What is Graphical Programming?It's using a graphical user interface (GUI) rather than a command line style. GUI programs are what most people want to see these days. How you write GUI programs is very different from how you write conventional programs. The approach is to use events to drive the program -- event-driven programming. AWTIn Java 1.0, the language provided a set of classes that were intended to allow you to build GUI programs in a platform-independent way. This was the AWT, variously called:
The AWT is a platform-independent windowing/graphics toolkit, and exists in library of classes in package java.awt. AWT ShortcomingsUnfortunately, there were a number of shortcomings to the AWT. Since the AWT relied on the underlying windowing system on each platform, it:
JFC/SwingSo, JDK 1.2 introduced a new, far more functional and flexible set of classes called JFC (Java Foundation Classes). A subset of these classes is known as Swing, which solves the above problems pretty well. It is now possible (and relatively easy) to create a good-looking and usable GUI for your programs that is portable across Java platforms. We will get into more details on JFC and Swing later on in the course. It is important to note that JFC/Swing is not a replacement for everything in the AWT. Rather, many of the AWT classes are used heavily when you use JFC/Swing. Some classes in JFC/Swing are replacements for some classes in the AWT (JFrame for Frame, JApplet for Applet, etc.), but other classes in the AWT are retained and are still well used. |
This page was last modified on 02 October, 2007 |