Quantcast
Channel: @Blog("Baptiste Wicht") » Swing
Viewing all articles
Browse latest Browse all 2

Using Substance Look And Feel in OSGi

$
0
0

I experienced some problems with Substance in OSGi. Using this code :

SubstanceLookAndFeel.setSkin(new BusinessBlackSteelSkin());

I got different errors, like :

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at 
org.pushingpixels.substance.internal.utils.SubstanceColorUtilities.getDefaultBackgroundColor(SubstanceColorUtilities.java:823)

I found a simple solution to make Substance work in OSGi :

try {
      UIManager.setLookAndFeel(new SubstanceBusinessBlackSteelLookAndFeel());
} catch (UnsupportedLookAndFeelException e) {
      LoggerFactory.getLogger(getClass()).error(e.getMessage(), e);
}

UIManager.getLookAndFeelDefaults().put("ClassLoader", SubstanceBusinessBlackSteelLookAndFeel.class.getClassLoader());

With that code, i’ve no more problems using Substance Look And Feel.

Hope that will help someone.


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images