那个GG写个简单的按钮程序来看下

解决方案 »

  1.   

    Java显示一个界面非常简单import javax.swing.*;public class Test01 {    public static void main(String[] args) {        
            JFrame frame = new JFrame();
            
            JButton button = new JButton("Button");
            frame.getContentPane().add(button);
            
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.setSize(100, 50);
            frame.setVisible(true);
        }
    }