-3
try{
UIManager.setLookandFeel(UIManager.getSystemLookandFeelmaster());
}
catch (Exception e)
{
    e.printStackTrace();
}

This is the code, in which I am getting the "cannot find symbol" error.

Edit: "master" is the class name

3 Answers3

0

UIManager does not have a method called getSystemLookandFeelmaster, I believe you mean getSystemLookAndFeelClassName

Either your IDE's auto complete should have helped (if you're not using one, you should) and/or a check of the JavaDocs for UIManager would have highlighted the issue and provided a recommended solution - not to mention any number of available examples

MadProgrammer
  • 343,457
  • 22
  • 230
  • 366
0

Your code appears to be referring to something that the compiler doesn't understand. Compile it again. If still it is not solved, then check all the dependent jars are imported correctly. Better to use some IDE(Eclipse/InteliJ etc), it will show you whether your code is correct or not.

Possible suggestion : What does a "Cannot find symbol" compilation error mean?

0

There is no UIManager.getSystemLookandFeelmaster under UIManager java documentation.

UIManager

Are you looking for this instead ?

try{
UIManager.setLookandFeel(UIManager.getSystemLookAndFeelClassName());
}
catch (Exception e)
{
    e.printStackTrace();
}
WL.T
  • 193
  • 1
  • 13