12.8. Using Panels as Subcontainers

 
[Page 392 ( continued )]

11.8. Framework-Based Programming Using Java API

The Java API ( Application Program Interface ) consists of numerous classes and interfaces grouped into more than a dozen packages. You have used classes and interfaces in the java.lang , javax.swing , and java.util packages.

  • java.lang contains core Java classes (e.g., System , Math , Object , String , StringBuffer , Number , Character , Boolean , Byte , Short , Integer , Long , Float , Double , Comparable , and Cloneable ). This package is implicitly imported to every Java program.

  • javax.swing contains the graphical user interface components for developing Swing GUI programs.

  • java.util contains many utilities, such as Arrays, ArrayList, Vector, Date , Calendar , and GregorianCalendar .

These are just a few of the classes and interfaces you have learned. To create comprehensive projects, you have to use more classes and interfaces in the Java API. The classes and interfaces in the Java API establish a framework for programmers to develop applications using Java. For example, the classes and interfaces in the Java GUI API establish a framework for developing GUI programs. You have to use these classes and interfaces and follow their conventions and rules to create applications. This is referred to as framework-based programming .

Once you understand the concept of Java and object-oriented programming, the most important lesson from now on is learning how to use the API to develop useful programs. The most effective way to achieve this is to imitate good examples. The book provides many carefully designed examples to demonstrate the concept of framework-based programming using the Java API. You will learn the Java GUI programming framework in Chapters 12 “16, the Java exception-handling framework in Chapter 17, and the Java I/O framework in Chapter 18.

 


Introduction to Java Programming-Comprehensive Version
Introduction to Java Programming-Comprehensive Version (6th Edition)
ISBN: B000ONFLUM
EAN: N/A
Year: 2004
Pages: 503

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net