Page 789 - Introduction to Programming with Java: A Problem Solving Approach
P. 789
APPENDIX 4
Packages
As you may recall, a package is a group of related classes. In this appendix, we describe the packages Sun created for organizing its library of Java API classes. We then show you how to create your own packages for programmer-defined classes. Finally, we introduce you to some nifty advanced options.
Java API Packages
When you download a version of Java from Sun, you get the API package hierarchies as part of the Java 2 Software Development Kit (SDK). Installation of that “kit” automatically makes the Java API packages part of your Java environment.
Java API classes are organized in package hierarchies. Figure A4.1 shows part of these Java API pack- age hierarchies. Notice that this shows two hierarchies, one with the java package at its root, and another
Apago PDF Enhancer
java
java.applet
java.awt
java.io
java.lang
java.text
java.util
java.awt.event
java.awt.image
java.awt.geom
javax
javax.imageio
javax.swing
javax.swing.border
Figure A4.1 Abbreviated Java API package hierarchies
javax.swing.event
javax.swing.filechooser
755