Swing插件

在eclipse下用Swing插件建一个Frame时

程序报错:he type javax.swing.JComponent cannot be resolved. It is indirectly referenc.

原因应该是jer1.8不兼容。

具体解决方法:

  1.在project explorer工作区中鼠标右击:

      

   选择Building Path/Configure Build Path...

  2.选择Libraries->Add Library

    

  3.去下载好其他版本的JRE(我用的是jre1.7),放入原来JRE所在文件夹下,在JRE System Library中下选中就行了。

    

猜你喜欢

转载自www.cnblogs.com/oldhuang/p/10013558.html