Home Segments Top Top Previous Next

675: Sidetrip

A component is said to be a heavyweight component if it uses programs provided by your computer's operating system to display buttons, choice lists, text fields, and the like. Such operating-system programs are said to be the components's peers.

A swing component is said to be a lightweight component because it does the high-level display work itself, rather than relying on a program provided by your computer's operating system.

Restricting your display work to the swing classes has two major benefits. First, the swing classes offer more features than you find in the common denominator of the popular operating systems. Second, the swing classes offer selectable look and feel. If you use only swing-class components, you can easily have your program look as though it is running on the operating system whose look you prefer.