No enclosing instance of type E is accessible. 静态方法(main)中调用内部类,会出现这样的问题: 学习了:https://www.cnblogs.com/runnigwolf/p/5570810.html http://blog.csdn.net/sunny2038/article/details/6926079 public class SwingObserverExample { public static void main(String…