0

Ok so I am trying my best to learn this look and feel with java swing and this is really starting to piss me off. I need to learn xml but before I did that I went and started off with how would I load the xml file into the class so the class would take the look and feel. I made the code and I have an error.... It says -

The method getResourceAsStream(String) in the type Class is not applicable for the arguments (SynthLookAndFeel)

I've been trying to fix this and I tried to do what it says and change the object into a string but I have no idea what I am doing wrong. Here is the code:

SynthLookAndFeel laf = new SynthLookAndFeel();
    laf.load(Options.class.getResourceAsStream("PlaneTheme.xml"), Options.class);
    UIManager.setLookAndFeel(Options.class.getResourceAsStream(laf));
mKorbel
  • 109,525
  • 20
  • 134
  • 319
questions
  • 473
  • 6
  • 19

1 Answers1

1

In the current code, the error is in the third line.You loaded the look-and-feel in the second line and now you only need to pass it to the UIManager

UIManager.setLookAndFeel(laf);
madth3
  • 7,275
  • 12
  • 50
  • 74