/**
* Create a frame for SwingSet2 to reside in if brought up
* as an application.
*
* @param gc the gc
* @return the j frame
*/
public static JFrame createFrame(GraphicsConfiguration gc) {
JFrame frame = new JFrame(gc);
if (numSSs == 0) {
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
} else {
WindowListener l = new WindowAdapter() {
public void windowClosing(WindowEvent e) {
numSSs--;
swingSets.remove(this);
}
};
frame.addWindowListener(l);
}
//由Jack Jiang于2012-09-22加上,防止因JToolBar的大小而影响JFrame的prefereSize使得没法再缩小
frame.setMinimumSize(new Dimension(100,100));
return frame;
}
SwingSet2.java 文件源码
java
阅读 37
收藏 0
点赞 0
评论 0
项目:beautyeye
作者:
评论列表
文章目录