com.sun.awt.AWTUtilities, Eclipse gives a error

When using com.sun.awt.AWTUtilities, Eclipse gives a error:

 

- Access restriction: The method setWindowOpacity(Window, float) from the type AWTUtilities is not accessible due to restriction on required library C:Program FilesJavajre6librt.jar

- Access restriction: The type AWTUtilities is not accessible due to restriction on required library C:Program FilesJavajre6librt.jar

 

You can fix it like this:

Preferences -> Java -> Compiler -> Errors/Warnings -> Deprecated and restricted API ->

Forbidden reference -> change "error" to "warning" 

 

Don't worry. It works。

阅读更多
文章标签: setWindowOpacity
个人分类: UI编程(JAVA/C#)
上一篇STM32调试问题
下一篇C/C++标准函数库
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

关闭
关闭