title: How to use different themes between main class and child classes in swing java
body: <p>I made a desktop application where it has may classes, and each is set to its own design and theme, but when I switch to the child class from main class, the theme of main class affects and removes the theme of secondary classes.
  Please help me to let custom JFrame class be independent on its theme (LookAndFeel).</p>
  
  <p>Main class theme is set as follow :</p>
  
  <pre><code>       public static void main(String[] args) {
      try {
          for (UIManager.LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) 
            {
              UIManager.setLookAndFeel("com.jtattoo.plaf.aero.AeroLookAndFeel");
             }
         }
      catch (ClassNotFoundException ex) {
          Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
      }
      catch (InstantiationException ex) {
          Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
      }
      catch (IllegalAccessException ex) {
          Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
      }
      catch (UnsupportedLookAndFeelException ex) {
          Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
      }
      EventQueue.invokeLater(new Runnable(){
  
          @Override
          public void run() {
              new Main().setVisible(true);
          }
      });
  }
  </code></pre>
  
  <p>Child class is set as follow:</p>
  
  <pre><code>     public static void main(String args[]) {
  
      try {
  
  
          for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
              if ("Nimbus".equals(info.getName())) {
                  javax.swing.UIManager.setLookAndFeel(info.getClassName());
                  break;
              }
          }
      } catch (ClassNotFoundException ex) {
          java.util.logging.Logger.getLogger(VisitStudents.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
      } catch (InstantiationException ex) {
          java.util.logging.Logger.getLogger(VisitStudents.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
      } catch (IllegalAccessException ex) {
          java.util.logging.Logger.getLogger(VisitStudents.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
      } catch (javax.swing.UnsupportedLookAndFeelException ex) {
          java.util.logging.Logger.getLogger(VisitStudents.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
      }
  
      /* Create and display the form */
      java.awt.EventQueue.invokeLater(new Runnable() {
          public void run() {
              new VisitStudents().setVisible(true);
          }
      });
  }
  </code></pre>