0

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

Ali Ben Messaoud
  • 11,690
  • 8
  • 54
  • 87

2 Answers2

1

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.

Buhake Sindi
  • 87,898
  • 29
  • 167
  • 228
  • I already done these steps and got no response, 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` – Ali Ben Messaoud Apr 28 '11 at 15:33
  • Press `Ctrl+O` on your code and see the possible imports you can use. – Buhake Sindi Apr 28 '11 at 15:34
  • I don't see any snapshot, but is there any other library that references `SyntheticalLookAndFeel` other than `Sythentica.jar`? – Buhake Sindi Apr 28 '11 at 15:48
  • The snapshot is up in my question. I downloaded the jar from http://www.jyloo.com/synthetica/download/ and I used the code as mentioned in ReadMe.txt . Also i added the Jar file to classpath ... – Ali Ben Messaoud May 01 '11 at 10:21
  • I find the problem. Look at answer down. :)) – Ali Ben Messaoud May 01 '11 at 10:41
  • I find the problem. I must add Synthetica.jar first then add a theme. To downlaod Synthetica.jar visit this link : http://www.jyloo.com/synthetica/download/ . To download a theme try http://www.jyloo.com/synthetica/themes/ Add to main this code to enable theme: `try { UIManager.setLookAndFeel(new SyntheticaBlueMoonLookAndFeel()); } catch (Exception e) { e.printStackTrace(); }` /// Thanks The Elite Gentleman! – Ali Ben Messaoud May 01 '11 at 10:57
  • 1
    I'm glad to have been of help. Happy coding! – Buhake Sindi May 05 '11 at 20:35
0

java.lang.NoClassDefFoundError: sun/swing/plaf/synth/SynthUI I found the solution. I faced the same issue. It needs additional jars.

JARS Required

1) seaglasslookandfeel0.2 jar at https://seaglass.googlecode.com/svn/doc/downloads.html

2) synthetica.jar http://www.javasoft.de/synthetica/download/

3) junit 3.8 jar http://www.java2s.com/Code/Jar/j/Downloadjunit309jar.htm

4) The theme jar of synthetica that you select: http://www.javasoft.de/synthetica/themes/

5) synthetica add ons jar to support swing addons like date picker etc http://www.jyloo.com/syntheticaaddons/download/

Community
  • 1
  • 1
Anuja
  • 409
  • 6
  • 18