#眉標=Java、Swing、AWT #副標=JDK 6.0 Update 10 #大標=改變Java Swing外觀的Look and Feel #作者=文/圖 黃嘉輝 ============= 程式1 try { // 設定Nimbus Look and Feel UIManager.setLookAndFeel( new com.sun.java.swing.plaf. nimbus.NimbusLookAndFeel()); } catch (UnsupportedLookAndFeelException e) {...} ================ ============= 程式2 try { // 設定Nimbus Look and Feel UIManager.setLookAndFeel( "com.sun.java.swing.plaf. nimbus.NimbusLookAndFeel"); } catch (UnsupportedLookAndFeelException e) {...} ================ ============= 程式3 // SwingSet3 Nimbus Look and Feel import com.sun.swingset3.DemoProperties; // 設定Annotation註解 @DemoProperties( value = "Nimbus Look and Feel Demo", category = "Nimbus Look and Feel", description = "示範JDK 6.0 Update 10", sourceFiles = { "NimbusLookandFeelDemo.java", "images/java.png" } ) // 主程式 public class NimbusLookandFeelDemo extends JFrame { ... } ================ ============= 程式4 super(NimbusLookandFeelDemo.class.getAnnotation( DemoProperties.class).value()); ================ 1