lightweight : Java Glossary

*0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ (all)

lightweight
You can create simple custom components by overriding a few methods of the official ones. These pure Java custom components are referred to as lightweights. They don’t have an associated GUI (Graphic User Interface) peer object. Since all the code is in Java, these components behave identically on different platforms. In contrast heavyweight components behave according to native GUI rules. Lightweights do their own drawing, based on something low-level like a canvas or panel. This gives them precise control over how they look and behave. Heavyweights use the native drawing facilities. Lightweights behave the same on all platforms. Heavyweights behave according to the local customs.

For example, Swing asks the underlying OS (Operating System) for a window of raw pixels and Swing draws the various lightweight buttons, labels etc. on it. Swing does the analyis to figure out which component you clicked with your mouse. In contrast, AWT (Advanced Windowing Toolkit) asks the OS to draw individual heavyweight native buttons, labels etc. The OS mananges the GUI components and figures out which one you clicked.


This page is posted
on the web at:

http://mindprod.com/jgloss/lightweight.html

Optional Replicator mirror
of mindprod.com
on local hard disk J:

J:\mindprod\jgloss\lightweight.html
Canadian Mind Products
Please the feedback from other visitors, or your own feedback about the site.
Contact Roedy. Please feel free to link to this page without explicit permission.

IP:[65.110.21.43]
Your face IP:[34.206.3.58]
You are visitor number