简体   繁体   English

在学习JavaFx之前应该学习Swing吗?

[英]Should I learn Swing before learning JavaFx?

Does it make sense to start learning JavaFx if I do not have any background in UI programming? 如果我没有UI编程的背景,那么开始学习JavaFx是否有意义? Is it more advisable to learn Swing first and then move on to JavaFx ? 首先学习Swing然后再学习JavaFx是否更明智?

I tried the getting started tutorial on JavaFx website in Netbeans and the code looked extremely complicated to me. 我在Netbeans的JavaFx网站上尝试了入门教程 ,但是代码对我来说看起来极其复杂。 I am wondering if JavaFx is too advanced for a beginnner GUI developer. 我想知道JavaFx对于初学者GUI开发人员是否太高级了。

Looking at the JavaFX tutorial I would say that: 看一下JavaFX教程,我会说:

  1. you don't need to know Swing to use JavaFX 您不需要了解Swing就可以使用JavaFX
  2. if you find the JavaFX tutorial hard learning Swing won't be easier 如果您发现JavaFX教程很难学习,Swing不会再简单了

If you have no programming background at all then starting in any language is going to be a challenge. 如果您完全没有编程背景,那么以任何一种语言开始将是一个挑战。 If you know a little programming in a language then it is still going to be a challenge. 如果您懂一点语言,那么它仍然将是一个挑战。

My advice is to dive in and work at it. 我的建议是潜入并努力工作。 A quick google search (JavaFX Hello World) has a number of hits... I took a quick look at this one and I'd say start with it. 快速谷歌搜索(JavaFX的的Hello World)有一定数量的命中......我刚刚看了一下,在这一个 ,我会说,开始使用它。

From what I understand the JavaFX libraries do not have that many proper UI components but since JavaFX allows you to use any Swing component it might be useful to know Swing. 据我了解,JavaFX库没有那么多适当的UI组件,但是由于JavaFX允许您使用任何Swing组件,因此了解Swing可能会很有用。 This will probably be less true and less true as JavaFX matures. 随着JavaFX的成熟,这可能会变得越来越不正确。

I don't think knowing swing will give you much of an upper hand with JavaFX. 我认为了解摆动不会给您JavaFX带来很大的优势。 JavaFX seems more like scripting rather than actual java programming. JavaFX似乎更像是脚本而不是实际的Java编程。 You can learn JavaFX fine without swing. 您可以轻松学习JavaFX。

Well, there is at least a fair amount of similarities... a Stage eg is the equivalent of a JFrame in Java, a scene is the equivalent to a JPanel... the binding mechanism is similar (well, sort of) to the listener concept in Java... 好吧,至少有很多相似之处……一个阶段,例如,相当于Java中的一个JFrame,一个场景,等同于一个JPanel……,绑定机制类似于(类似) Java中的侦听器概念...

Oh, and JavaFX shouldn't be too complicated for programmers, as it is primarily targeted to web developers ^^. 哦,JavaFX对于程序员来说应该不太复杂,因为它主要针对Web开发人员^^。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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