Apply the SyntheticaBlackEyeLookAndFeel in the application

2

I'd like to know how I can apply new look and feel s that are not part of JDK. In attempting to apply, you are giving an error in which I did not find an answer that could solve the problem.

For example: Synthetica Classy Look and Feel :

Test Class:

import de.javasoft.plaf.synthetica.SyntheticaBlackEyeLookAndFeel;
import java.text.ParseException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;

public class JavaApplication12 {

/**
 * @param args the command line arguments
 */
public static void main(String[] args) {
    try {
        UIManager.setLookAndFeel(new SyntheticaBlackEyeLookAndFeel());
    } catch (UnsupportedLookAndFeelException | ParseException ex) {
        Logger.getLogger(JavaApplication12.class.getName()).log(Level.SEVERE, null, ex);
    }        
    JOptionPane.showMessageDialog(null, "Teste");
}

}

Error description:

  

reference to setLookAndFeel is ambiguous both method   setLookAndFeel (LookAndFeel) in UIManager and method   setLookAndFeel (String) in UIManager match

    
asked by anonymous 19.08.2016 / 20:46

1 answer

2

According to the official website and how it can be seen in this answer , the correct way to apply is as follows:

try {

  UIManager.setLookAndFeel("de.javasoft.plaf.synthetica.SyntheticaBlackEyeLookAndFeel");

} catch (Exception e) {

  e.printStackTrace();

}

Remembering that you should also add synthetica.jar in the classpath, in addition of the downloaded theme jar (in this case, the syntheticaBlackEye.jar ) before making this call, as can be seen below in the sample print:

    
19.08.2016 / 20:52