62,614
社区成员
发帖
与我相关
我的任务
分享
import javax.swing.JButton;
import javax.swing.JFrame;
public class Test extends JFrame{
private static final long serialVersionUID = -6918033826886164234L;
public Test() throws HeadlessException {
super();
this.getContentPane().add(new JButton("测试"));
this.setBounds(100, 100, 100, 100);
}
public static void main(String[] args) {
new Test().setVisible(true);
}
}
代码如上