Before
After
Below is the sample code
/*
* This method sets the current System's look and feel for the GUI
*
* */
public void setLookAndFeel(){
try {
// Set System Look and Feel
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
}
catch (UnsupportedLookAndFeelException e) {
errorString = e.getMessage();
e.printStackTrace();
}
catch (ClassNotFoundException e) {
errorString = e.getMessage();
e.printStackTrace();
}
catch (InstantiationException e) {
errorString = e.getMessage();
e.printStackTrace();
}
catch (IllegalAccessException e) {
errorString = e.getMessage();
e.printStackTrace();
}
}
Hope it was useful to you.
No comments:
Post a Comment