简体   繁体   中英

Why can't NetBeans & Java find Swing's contents?

After over a decade, I decided to blow the dust off my university dissertation and get it working again.

Oddly, NetBeans can't seem to find the libraries for javax.swing . Every single thing I imported for javax.swing can no longer be found with "cannot find symbol" for javax.swing.JFrame , javax.swing.JLabel etc.

I can't find where the library would be to import it!

Should I be using a different version of the JDK? Do I have to download javax from somewhere and include it?

在此处输入图像描述

I managed to resolve this by downloading a different JDK (1.8, which I think contains JDK 8) from oracle. Works now. Maybe the other JDK I downloaded is too new, and there were changes to the packages, or maybe it didn't include all the packages. Either way, done now.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM