Mega Code Archive

 
Categories / Java Tutorial / Swing
 

Changing the Look and Feel to MotifLookAndFeel

import javax.swing.JFrame; import javax.swing.UIManager; public class ChangeLookFeelToMotifLookAndFeel {   public static void main(String[] args) {     try {       UIManager.setLookAndFeel("com.sun.java.swing.plaf.motif.MotifLookAndFeel");     } catch (Exception e) {       System.err.println("Look and feel not set.");     }     JFrame aWindow = new JFrame("This is the Window Title");     aWindow.setBounds(50, 100, 300,300);      aWindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);     aWindow.setVisible(true);   } }