在这种特殊情况下,从构造函数调用方法有什么问题吗?
class GUI2
{
JFrame jfrm;
static Container cntr;
GUI2(){
jfrm=new JFrame("Raaga");
jfrm.setSize(555,493);
jfrm.setResizable(false);
jfrm.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
jfrm.addWindowListener(new WindowAdapter(){
public void windowClosing(WindowEvent we){
System.exit(0);
}
});
jfrm.setVisible(true);
}