1 36 37 40 41 42 import java.awt.*; 43 import javax.swing.*; 44 import javax.swing.border.*; 45 import javax.swing.plaf.metal.MetalLookAndFeel ; 46 47 53 public class Metalworks { 54 55 public static void main( String [] args ) { 56 UIManager.put("swing.boldMetal", Boolean.FALSE); 57 JDialog.setDefaultLookAndFeelDecorated(true); 58 JFrame.setDefaultLookAndFeelDecorated(true); 59 Toolkit.getDefaultToolkit().setDynamicLayout(true); 60 System.setProperty("sun.awt.noerasebackground","true"); 61 62 try { 63 UIManager.setLookAndFeel(new MetalLookAndFeel ()); 64 } 65 catch ( UnsupportedLookAndFeelException e ) { 66 System.out.println ("Metal Look & Feel not supported on this platform. \nProgram Terminated"); 67 System.exit(0); 68 } 69 JFrame frame = new MetalworksFrame(); 70 frame.setVisible(true); 71 } 72 } 73 | Popular Tags |