0

I have two java classes. Second one appears by the button on first java class. I have set substance look and feel on first java class once I genarate the second java class by pressing the button in first java class it also comes with the same look and feel info in first class. How can I get rid of this ?? Please help me..

Substance look and feel in my first class ---------------------------------------------

java.awt.EventQueue.invokeLater(new Runnable() {
    public void run() {
        try {
            UIManager.setLookAndFeel("org.jvnet.substance.skin.SubstanceRavenGraphiteGlassLookAndFeel");
            new TestFrame().setVisible(true);
        } catch (ClassNotFoundException ex) {
            Logger.getLogger(TestFrame.class.getName()).log(Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            Logger.getLogger(TestFrame.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            Logger.getLogger(TestFrame.class.getName()).log(Level.SEVERE, null, ex);
        } catch (UnsupportedLookAndFeelException ex) {
            Logger.getLogger(TestFrame.class.getName()).log(Level.SEVERE, null, ex);
        }

    }
});
mKorbel
  • 108,320
  • 17
  • 126
  • 296
  • code posted here is valid for whole JVM instance, not clear if you want to change theme (Substance) or switch to another L&F, read Oracle tutorial Modifying the Look and Feel – mKorbel Apr 17 '14 at 10:59
  • I think you're out of luck there since there is only one UIManager for both of your windows that handles all the LookAndFeel stuff :-( – piet.t Apr 17 '14 at 11:00

0 Answers0