Tip on Mixing Heavyweight and Lightweight Java Components
By Laura Bennett2003-10-01
The resolution
table cellspacing="0" cellpadding="5" width="30%" align="right" border="1">
|
Helping ordinary people create extraordinary websites! |
Tip on Mixing Heavyweight and Lightweight Java ComponentsBy Laura Bennett2003-10-01 The resolution table cellspacing="0" cellpadding="5" width="30%" align="right" border="1"> The JComboBox class differs from other Swing classes in that it does offer a method called setLightWeightPopupEnabled(Boolean aFlag). This method allows you make the popup a heavyweight object so that it will appear on top of a Frame window. This is the exception rather than the rule. | |
The bottom line is that you should not mix heavyweight and lightweight objects. Follow one path or the other so that your application has a unified and consistent view across platforms. The advantages of using all lightweight objects include supporting transparent areas, the lack of additional peer classes (thus improving performance), and the ability to say that you used 100% Java code.