jf.setDefaultCloseOperation(jf.EXIT_ON_CLOSE);//关闭窗口
jf.getContentPane().add(jb);//将button加入到jf中
button.setText("改变按钮字!");
关闭窗口,将按钮添加到窗口中
最新推荐文章于 2019-01-10 11:44:51 发布
jf.setDefaultCloseOperation(jf.EXIT_ON_CLOSE);//关闭窗口
jf.getContentPane().add(jb);//将button加入到jf中
button.setText("改变按钮字!");