Import the necessary classes:
import javax.swing.UIManager; import javax.swing.plaf.metal.MetalLookAndFeel;
Then put this in your code:
UIManager.setLookAndFeel( new MetalLookAndFeel() );