一个程序书上main函数部分是
public static void main(String[] arguments)
{
ChangeTitle frame=new ChangeTitle();
ExitWindow exit=new ExitWindow();
frame.addWindowListener(exit);
frame.pack();
frame.setVisible(true);
}
ExitWindow类声明省略我把退出的语句换成 setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);为什么编译的时候提示  无法从静态上下文中引用非静态方法?我是新手,刚学不久,只是研究书上的例子。