阅读背景:

如何在java swing中设置特定的窗口(框架)大小?

来源:互联网 

My code does not work:

我的代码不起作用:

JFrame frame = new JFrame("mull");

mull panel = new mull();

// add panel to the center of window
frame.getContentPane().add("Center", panel);
frame.setSize(500, 300); // << not working!!!
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.pack(); // give a suitable size to window automatically
frame.setVisible(true); // make window visible
JFrame fra



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: