peer : Java Glossary

*0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ (all)

peer
Associated with each Component are three objects:
  1. the standard AWT (Advanced Windowing Toolkit) button object.
  2. a peer mirroring interfacing button object constructed in the style that the native GUI (Graphic User Interface) likes.
  3. perhaps also a hidden button object internal to the native GUI.
The behaviour of the particular Component can depend heavily on the peer. The peer object for a Button, for example, contains platform-dependent code to hook into the native GUI Windows button-drawing code, whereas the AWT button object would be identical for all platforms. The same Java program may behave quite differently on different platforms, following the maxim, when in Rome do as the Romans.

In Swing, there is no peer native gui object for each Component, just a peer object for the entire application, which Swing then manages totally like a giant Canvas, displaying the various components on it all on its own.


This page is posted
on the web at:

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

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

J:\mindprod\jgloss\peer.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:[3.22.217.176]
You are visitor number