⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cdelookandfeel.java

📁 《精通Java Swing程序设计S》这本书所附带的JAVA程序写得很漂亮,都是SWING的实例子,很适合初学者。
💻 JAVA
字号:
import javax.swing.*;

public class CDELookAndFeel{
	
  public static void main(String[] args){

    try {
	UIManager.setLookAndFeel("com.sun.java.swing.plaf.motif.MotifLookAndFeel");
    }  
    catch ( UnsupportedLookAndFeelException e ) {
	    System.out.println ("This Look & Feel not supported on this platform. \nProgram Terminated");
	    System.exit(0);
    }
    catch ( IllegalAccessException e ) {
	    System.out.println ("This Look & Feel could not be accessed. \nProgram Terminated");
	    System.exit(0);
    }
    catch ( ClassNotFoundException e ) {
            System.out.println ("This Look & Feel could not found. \nProgram Terminated");
	    System.exit(0);
    }   
    catch ( InstantiationException e ) {
            System.out.println ("This Look & Feel could not be instantiated. \nProgram Terminated");
	    System.exit(0);
    }
    catch ( Exception e ) {
	    System.out.println ("Unexpected error. \nProgram Terminated");
	    e.printStackTrace();
	    System.exit(0);
    }
    JFrame F = new MainFrame();
    F.setVisible(true); 
  } // end of main
}//end of class CDELookAndFeel

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -