Look and Feel is not updated on all subcomponents

2

I'm facing a problem with the look and feel that I found a bit strange, when I run the project through IDE all components are rendered according to the skin I selected, but when I generate the JAR, some components are not rendered with the theme I chose.

Both JAR and IDE are started using the code below:

public class App 
{
    public static void main(final String[] args) throws ParseException, UnsupportedLookAndFeelException 
    {
        UIManager.setLookAndFeel(new SubstanceBusinessBlackSteelLookAndFeel());

        SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                Principal.main(args);
            }
        });
     }
}

Someone has gone through something similar, the program works perfectly without any errors.

Here's the documentation link for the Substance library I'm using.

CMD java version:

>java -version
java version "1.8.0_05"
Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode)

>echo %JAVA_HOME%
C:\Program Files\Java\jdk1.8.0_05

In the IDE is the same:

    
asked by anonymous 13.08.2014 / 14:24

1 answer

1

In fact it was not a "problem" what happens is when I generate the jar executable by eclipse I selected the option Packaging required libraries into generate JAR with this Eclipse replaces the main jar class with this% with%.

//A classe principal fica assim, e o skin MÃO funciona 100% alguns 
//componentes não aplicava o skin correto.
Main-Class: org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader

I changed to the option: org.eclipse.jdt.internal.jarinjarloader I did not understand the reason but it worked for me. Because anyway it passes through my App class.

    
14.08.2014 / 01:51