Search code examples
javaswinglook-and-feel

want to implement jtattoo look and feel, but not working


I want to implement Acryl Look and Feel, it runs fine when i run file only, but when i run Main Project it returns the default l&F.

public static void main(String args[]) {
    try {
        for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
            /*if ("Windows".equals(info.getName())) {
             * javax.swing.UIManager.setLookAndFeel(info.getClassName());
             * break;
             * }*/
            UIManager.setLookAndFeel("com.jtattoo.plaf.acryl.AcrylLookAndFeel");
         }
    } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | javax.swing.UnsupportedLookAndFeelException ex) {
        java.util.logging.Logger.getLogger(LoginForm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
    }

Solution

  • Recheck the main class you set, for e.g login form can be a main class for a particular project.