posted 22 years ago
Hi Pink,
Look at the javax.swing.UIManager. To get the WindowsLookAndFeel you just use the following before you create your tree:
try
{
UIManager.setLookAndFeel( "com.sun.java.swing.plaf.windows.WindowsLookAndFeel" );
}
catch( Exception e ) {};
This will change all components created to WindowsLookAndFeel if you don't want that then you need to perform the exact thing again after your tree is created to get back to whatever look and feel you want. For example:
try
{
UIManager.setLookAndFeel( UIManager.getCrossPlatformLookAndFeelClassName() );
}
catch( Exception e ) {};
could be used to get back to the Metal LookAndFeel.
Regards,
Manfred.