如何抑制 NetBeans 6.9.1 中的警告?

发布于 2024-09-25 09:15:47 字数 230 浏览 0 评论 0原文

在教授 JavaFX 时,我们使用一些包含 Swing 组件的旧文件。它们在 NetBeans 6.8 中运行正常,但在 NetBeans 6.9.1 中会生成许多以下警告:

警告:[warnonuse] 包 javafx.ext.swing 已被使用。 import javafx.ext.swing.SwingToggleButton;

有什么方法可以抑制这些警告的生成吗?

On teaching JavaFX, we use some older files containing Swing components. They run OK in NetBeans 6.8, but in NetBeans 6.9.1 many following warnings are generated:

warning: [warnonuse] Package javafx.ext.swing has been used.
import javafx.ext.swing.SwingToggleButton;

Is there any way to suppress generation of these warnings?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

风透绣罗衣 2024-10-02 09:15:47

在JavaFX SDK配置文件目录下的desktop.properties文件中,
你可以改变属性
swing_compile_opts="-XDwarnOnUse=javafx.ext"
swing_compile_opts=

在 Netbeans 下,这将位于
NETBEANS_HOME/javafx/javafx-sdk/profiles。

这仅适用于 1.3.1,并且很可能在下一个版本中会完全不同
JavaFX 的主要版本。

In the desktop.properties file under your JavaFX SDK profiles directory,
you can change the property
swing_compile_opts="-XDwarnOnUse=javafx.ext"
to swing_compile_opts=

Under Netbeans this would be in
NETBEANS_HOME/javafx/javafx-sdk/profiles.

This only applies to 1.3.1 and most likely will be totally different in the next
major release of JavaFX.

暖风昔人 2024-10-02 09:15:47

谢谢,吉姆。这就是窍门。

对于 Mac 用户,您必须进入 /Applications/Netbeans/Netbeans 6.9.1.app 文件夹,然后修改

Contents/Resources/NetBeans/javafx/javafx-sdk/profiles.  

桌面配置文件,然后重新启动 Netbeans 后警告就会消失。

Thanks, Jim. That does the trick.

For Mac users, you have to go into your /Applications/Netbeans/Netbeans 6.9.1.app folder, then down to

Contents/Resources/NetBeans/javafx/javafx-sdk/profiles.  

I modified the desktop profile and after restarting Netbeans the warnings went away.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文