我用JCreator pro创建新的Basic Java Application工程 为什么只有这样的代码出来:/**
 * @(#)Test.java
 *
 * Test application
 *
 * @author 
 * @version 1.00 2009/5/17
 */
 
public class Test {
    
    public static void main(String[] args) {
    
     // TODO, add your application code
     System.out.println("Hello World!");
    }
}
请各高手指点一下:

解决方案 »

  1.   

    但是我的旧版本建好了会有这样的代码出来:import java.awt.*;
    import java.awt.event.*;/**
     * Sample application using Frame.
     *
     * @author 
     * @version 1.00 09/05/17
     */
    public class DdFrame extends Frame {
        
        /**
         * The constructor.
         */  
         public DdFrame() {
                    
            MenuBar menuBar = new MenuBar();
            Menu menuFile = new Menu();
            MenuItem menuFileExit = new MenuItem();
            
            menuFile.setLabel("File");
            menuFileExit.setLabel("Exit");
            
            // Add action listener.for the menu button
            menuFileExit.addActionListener
            (
                new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        DdFrame.this.windowClosed();
                    }
                }
            ); 
            menuFile.add(menuFileExit);
            menuBar.add(menuFile);
            
            setTitle("Dd");
            setMenuBar(menuBar);
            setSize(new Dimension(400, 400));
            
            // Add window listener.
            this.addWindowListener
            (
                new WindowAdapter() {
                    public void windowClosing(WindowEvent e) {
                        DdFrame.this.windowClosed();
                    }
                }
            );  
        }
        
        
        /**
         * Shutdown procedure when run as an application.
         */
        protected void windowClosed() {
        
         // TODO: Check if it is safe to close the application
        
            // Exit application.
            System.exit(0);
        }
    }
      

  2.   

    我的旧版本会生成这样的代码
    import java.awt.*;
    import java.awt.event.*;/**
     * Sample application using Frame.
     *
     * @author 
     * @version 1.00 09/05/17
     */
    public class DdFrame extends Frame {
        
        /**
         * The constructor.
         */  
         public DdFrame() {
                    
            MenuBar menuBar = new MenuBar();
            Menu menuFile = new Menu();
            MenuItem menuFileExit = new MenuItem();
            
            menuFile.setLabel("File");
            menuFileExit.setLabel("Exit");
            
            // Add action listener.for the menu button
            menuFileExit.addActionListener
            (
                new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        DdFrame.this.windowClosed();
                    }
                }
            ); 
            menuFile.add(menuFileExit);
            menuBar.add(menuFile);
            
            setTitle("Dd");
            setMenuBar(menuBar);
            setSize(new Dimension(400, 400));
            
            // Add window listener.
            this.addWindowListener
            (
                new WindowAdapter() {
                    public void windowClosing(WindowEvent e) {
                        DdFrame.this.windowClosed();
                    }
                }
            );  
        }
        
        
        /**
         * Shutdown procedure when run as an application.
         */
        protected void windowClosed() {
        
         // TODO: Check if it is safe to close the application
        
            // Exit application.
            System.exit(0);
        }
    }