• Post Reply Bookmark Topic Watch Topic
  • New Topic

must be a simple question!!!!!

 
Maha Pratap
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey folks!
can some one explain me what does Java look and feel,motif , component peer mean. or just provide some link so that I can read the stuff there . tahnks in advance.
Maha
 
Rick Fortier
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Maha Pratap:
hey folks!
can some one explain me what does Java look and feel,motif , component peer mean. or just provide some link so that I can read the stuff there . tahnks in advance.
Maha

look and feel & Motif (one type) - http://java.sun.com/docs/books/tutorial/uiswing/start/swingTour.html#plaf
component peer - not sure http://java.sun.com/j2se/1.4/docs/api/java/awt/Component.html#getPeer()
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The phrase Component Peer ( sometimes called native peer ) describes the reference to the OS specific widget that a button, frame, or other GUI component actually uses to display. For example, if in your Java code you refer to a button, on a windows machine that button has a reference to a windows (probably MFC) button... on a Unix machine it has a reference to a Motif (or other GUI) button, on a Mac it has a reference to a MacOS button... This is all done in the background through the JVM, and you shouldn't really concern yourself with it...

This describes how it was done in AWT... in Swing only the top level GUI components ( JFrame, JDialog, JApplet, JWindow ) actually have a reference to a native peer. All other components are drawn onto the graphics context of this top level GUI component. This is why Swing components are described as "Light Weight Components" and AWT components are described as "Heavy Weight Components". This makes it possible to have a Pluggable Look & Feel in Swing... you just tell whatever piece of software that is drawing the components to draw them a different way...

HTH,
-Nate
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!