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
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
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
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?
There is no UIManager.getSystemLookandFeelmaster under UIManager java documentation.
Are you looking for this instead ?
try{
UIManager.setLookandFeel(UIManager.getSystemLookAndFeelClassName());
}
catch (Exception e)
{
e.printStackTrace();
}