Modern operating systems such as Microsoft’s Windows, Apple’s MacOS, and the different Unix-based versions such as Linux or Solaris use a graphical interface to communicate with the user. The communication consists of information displayed by programs and actions and commands issued by the user. This book is an introduction to graphic programming in Java. It is assumed that the reader knows the basic concepts of Java such as object-orientation, inheritance, interfaces, exceptions and use of packages.
There are two libraries for graphics components in Java: the Abstract Windowing Toolkit (AWT) and Swing. The first is the older one. It contains all the components needed to design graphical user interfaces. However, using AWT is not easy and the library is not free of bugs. The components of the Swing library are easier to work with and are much better implemented. Some Swing components need classes from the AWT library.