呵呵,你创建一个带有Frame的应用程序就影能够看出来。

解决方案 »

  1.   

    UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());http://java.sun.com/j2se/1.4.2/docs/guide/swing/1.4/Post1.4.html#1.4.2
      

  2.   

    import java.awt.*;
    import javax.swing.*;
    import javax.swing.border.*;
    import javax.accessibility.*;public class BoxDemo extends JFrame
    {
    public BoxDemo(){
    super("BOX"); JPanel bnPanel=new JPanel();
    JButton button1 = new JButton("Button1");
    JButton button2 = new JButton("Button2");
        
            bnPanel.setLayout(new BoxLayout(bnPanel,
                                                BoxLayout.Y_AXIS));
            bnPanel.add(Box.createRigidArea(new Dimension(10, 10)));
            bnPanel.add(button1);
            bnPanel.add(Box.createRigidArea(new Dimension(10, 10)));
            bnPanel.add(button2);
    bnPanel.add(Box.createRigidArea(new Dimension(10, 10)));        Container cp=getContentPane();
            cp.setLayout(new GridLayout(2, 1));
    cp.add(labelPanel);
    cp.add(bnPanel);
            pack();
         }
     public static void main(String[] args) {
            //Make sure we have nice window decorations.
            JFrame.setDefaultLookAndFeelDecorated(true);         //Create and set up the window.
            JFrame frame = new BoxDemo();
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);         frame.pack();
            frame.setVisible(true);
        }
    }
      

  3.   

    //错了一点,应该是这样
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.border.*;
    import javax.accessibility.*;public class BoxDemo extends JFrame
    {
    public BoxDemo(){
    super("BOX"); JPanel bnPanel=new JPanel();
    JButton button1 = new JButton("Button1");
    JButton button2 = new JButton("Button2");
        
            bnPanel.setLayout(new BoxLayout(bnPanel,
                                                BoxLayout.Y_AXIS));
            bnPanel.add(Box.createRigidArea(new Dimension(10, 10)));
            bnPanel.add(button1);
            bnPanel.add(Box.createRigidArea(new Dimension(10, 10)));
            bnPanel.add(button2);
    bnPanel.add(Box.createRigidArea(new Dimension(10, 10)));        Container cp=getContentPane();
            cp.setLayout(new GridLayout(2, 1));
    //cp.add(labelPanel);
    cp.add(bnPanel);
            pack();
         }
     public static void main(String[] args) {
            //Make sure we have nice window decorations.
            JFrame.setDefaultLookAndFeelDecorated(true);         //Create and set up the window.
            JFrame frame = new BoxDemo();
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);         frame.pack();
            frame.setVisible(true);
        }
    }
      

  4.   

    JFrame.setDefaultLookAndFeelDecorated(true);  ??好像不是很漂亮的说,有点难看
    不是 XP 风格,有点像 Linux 的
      

  5.   

    jdk有外观吗?jdk不是就一堆文件吗?哪有操作截面呀?我都是用2000的命令符和Editplus做jdk的,哪位达人告诉我jdk的界面在哪?怎么用?
      

  6.   

    不好意思。可能我问的不清楚 ,我是说运行JAVA程序时的程序界面。