LooK And Feel From Jide

This is the forum for JIDE Common Layer which is open sourced at https://github.com/jidesoft/jide-oss. Please note, JIDE technical support doesn't monitor this forum as often as other forums. Please consider subscribe for technical support for JIDE Common Layer so that you can use customer only forum to get a timely response.

Moderator: JIDE Support

Forum rules
Community driven forum for open source JIDE Common Layer. JIDE technical support doesn't monitor this forum as often as other forums. If you only use JIDE Common Layer, please consider subscribing for technical support for JIDE Common Layer so that you can use customer only forum to get a timely response.

LooK And Feel From Jide

Postby RajaRajeswari_V » Tue May 05, 2009 12:36 am

Hi,

In my application, earlier when we were using JDK 1.5 we had options for changing theme like we had options to change the look And Feel to Eclipse, Office, Xerto etc.
We did this in the following way
if(newTheme.equalsIgnoreCase("Eclipse"))
{
LookAndFeelFactory.installJideExtension(LookAndFeelFactory.ECLIPSE_STYLE);
LookAndFeelFactory.setDefaultStyle(LookAndFeelFactory.ECLIPSE_STYLE);
try
{
UIManager.setLookAndFeel(EclipseWindowsLookAndFeel.class.getName());
}
catch (Exception e)
{
e.printStackTrace();
}
}
This was with old jars of Jide.Now i am using evaluation version of Jide.
Looking at the jide documentation in the old jars, now im trying to do it this way

if(newTheme.equalsIgnoreCase("Eclipse"))
{
LookAndFeelFactory.installJideExtension(LookAndFeelFactory.ECLIPSE_STYLE);
LookAndFeelFactory.setDefaultStyle(LookAndFeelFactory.ECLIPSE_STYLE);
try
{
UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
}
catch (Exception e)
{
e.printStackTrace();
}
}

But some how it is not working as expected. Please advice
RajaRajeswari_V
 
Posts: 25
Joined: Tue Apr 28, 2009 8:33 pm

Re: LooK And Feel From Jide

Postby JIDE Support » Tue May 05, 2009 10:06 am

The correct way is

LookAndFeelFactory.setDefaultStyle(LookAndFeelFactory.ECLIPSE_STYLE);
UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");

or

UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
LookAndFeelFactory.installJideExtension(LookAndFeelFactory.ECLIPSE_STYLE);

The order matters. If you know when UIManager.setLookAndFeel is called, the second way is preferred. If you have other code calling UIManager.setLookAndFeel that you don't have control, use the first way.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am


Return to JIDE Common Layer Open Source Project Discussion (Community Driven)

Who is online

Users browsing this forum: No registered users and 15 guests

cron