Monday, January 13, 2014

How to set windows look and feel in Java

1. Use the below code to set Windows look and feel in Java:
  try {
  UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
          } catch (Exception er) { }

2. Use the below code to set look and feel back to default:
  try {
      UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
  } catch (Exception er) { }

No comments:

Post a Comment