JavaFX:为什么有两种不同的风格?
我正在学习 JavaFX。我将其添加到 Java 桌面应用程序中,并使用 Netbeans 7 执行此操作。我一直在互联网上搜索 JavaFX 示例,以实现我想做的任何事情(嵌入 swing、设置背景、添加渐变、合并动画)。 ..)。我发现两种 JavaFX 样式。
- 第一个示例: http://download.oracle.com/javafx/2.0/ Visual_effects/jfxpub-visual_effects.htm
- 第二个示例:http://javafx.com/samples/MediaBox/
我还发现了这个 http://netbeans.org/features/javafx/composer.html 表示 JavaFX 支持当前在 NetBeans IDE 7.0 中不可用。屏幕截图正在处理一个 FX 项目,我在 Netbeans 7 中无法选择该项目。我确实有可以制作的示例 FX 项目,但这些实际上是带有 FX 的 Java 项目(FX 的第一种风格) )。
我的猜测是,JavaFX 在最新版本 JavaFX 2 中进行了一些重新设计。第二个示例是较旧的样式,第一个示例是较新的样式。在我看来,第一个例子更像是对 Java 的补充,而不是一种单独的语言。
我猜对了吗? FX 的两种风格有何不同?
I am learning JavaFX. I'm adding it to a Java Desktop App and I'm doing this using Netbeans 7. I've been searching the internet for JavaFX examples for whatever I want to do (embed in swing, set background, add gradient, incorporate animation...). I am finding two JavaFX styles.
- 1st Example: http://download.oracle.com/javafx/2.0/visual_effects/jfxpub-visual_effects.htm
- 2nd Example: http://javafx.com/samples/MediaBox/
I also found this http://netbeans.org/features/javafx/composer.html which says JavaFX support is currently not available in NetBeans IDE 7.0. And the screen shot is handling an FX Project which I don't have a choice to make in my Netbeans 7. I do have sample FX projects that I can make but these are really Java projects with FX in it (the 1st style of FX).
My guess is that JavaFX has been somewhat redesigned in the latest version, JavaFX 2. The 2nd example being the older style and the 1st being the newer. It seems to me that the 1st example is more like an addition to Java instead of a separate language.
Did I guess right? What's up with the two styles of FX?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
NetBeans JavaFX Composer 是一个使用 JavaFX 组件创建 CustomNode 的工具,但适用于 JavaFX 1.3。
NetBeans 7.0有一个JavaFX插件,但到了2.0版本(实际上是测试版)。
JavaFX 1.3 是一种在 JVM 上运行的 DSL 脚本语言,而 JavaFX 2.0 则回归为 Java API。它们完全不同,但保留相同的类和想法(CSS 样式、视觉效果等)。
The NetBeans JavaFX Composer is a tool that create CustomNodes with JavaFX components, but works with JavaFX 1.3.
NetBeans 7.0 has a JavaFX plug-in, but to version 2.0 (actually in beta).
JavaFX 1.3 is a DSL script language that runs over JVM and JavaFX 2.0 returns to be a Java API. They are totally differents, but conserving same Classes and ideas (CSS style, visual effects, etc).