Search code examples
javaeclipsejarlook-and-feel

LookAndFeel Java Synthetica in Eclipse


I'm developing an application in Eclipse and WindowBuilder.

I tried to add a look and feel to GUI application.

I used Synthetica BlueMoon Look and Feel .

I added the Synthetica.jar to the class path and I added this code to the main:

import de.javasoft.plaf.synthetica.SyntheticaBlueMoonLookAndFeel;


try 
{
  UIManager.setLookAndFeel(new SyntheticaBlueMoonLookAndFeel());
} 
catch (Exception e) 
{
  e.printStackTrace();
}

So I got this error message after the import

The type de.javasoft.plaf.synthetica.SyntheticaLookAndFeel cannot be resolved. It is indirectly referenced from required .class files

This is a screenshot from Eclipse.

enter image description here


Solution

  • Do the following, and see if this resolves your problem:

    1. Right-Click your project and select "Properties".
    2. Select "Java Build Path" on the option pane and select "Libraries" tab.
    3. Click "Add JARs..." or "Add External JARs..." and search and add "Synthetica.jar".
    4. Once done, Click "OK".

    Now run your application.

    I'm assuming you're running your application within Eclipse.