This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
I've looked all over and investigated alot. But still for some reason I still have one doubt, becuase swings are still vauge to me. Do all(but 4) swing components "LOOK IDENTICAL" for all OS for the same program. Or are they just consistent (i.e. their image can be customized and will look that they were made for that particulat OS) or both ? thanks
Both. They will look very similar (font sizes may vary) on all systems. That is one reason for Swing. Each component handles its own rendering therefore they will be drawn the same on all systems. You can also force the Swing components to look like Motif, Windows, or Metal on all systems. If you just use Swing components without setting a look-and-feel you will see the Swing default (Metal). You can however force Swing to use Windows look-and-feel which would then draw Windows type components on all systems. Wow the power of Swing! Manfred.
Joined: Oct 08, 2000
Thanks Manfred, Now I'm finally beginning to understand, but what do you mean by Metal and Motif OS .
There are 3 look&feels for the Swing Components,namely, Metal, Motif and Windows. They differ in the looks of the components. You can use the Java Packages : 1)javax.swing.plaf.metal.MetalLookAndFeel - Metal Look 2)com.sun.java.swing.plaf.motif.MotifLookAndFeel - Motif Look 3)com.sun.java.swing.plaf.windows.WindowsLookAndFeel - Window Look With Regards, Kaustuv
The AWT uses heavyweight components, and Swing uses lightweight components. Heavyweight components rely on peer functions provided by the underlying operating system, and as such require much more system resources. The Look and Feel is determined by the operating system. Lightweight components are completely removed from the operating system and rely only on java. They always have the same Look and Feel except when specifically set differently (as described above).
"JavaRanch, where the deer and the Certified play" - David O'Meara
Joined: Oct 08, 2000
Thank you all, I think know I'm alot more familiar with swings.
subject: Do Swing Components (but 4) look identical for Operating Systems