Can someone tell me the difference/advantages/disadvantage between java desktop application and javafx??
Its not a disadvantage/advantage situation as much as understanding what each can provide and the old saying "use the right tool for the job".
Answer from yahoo answers Source for this answer:
javaFX is actually a different language (similar, but different syntax), but it runs on a JVM and can use Java classes. Mainly developed for "RIA" (rich Internet applications), across a variety of devices. Quite a few built-in features for developing fancy & flashy user-interfaces, without all the typing one has to do in a more nuts-n-bolts (low-level) language like Java.
Really, it's kinda hard to "compare"; JavaFX leverages all the advantages of Java & builds a platform on it for developing RIA's.
- JavaFX requires a JVM; but just having Java doesn't mean you have JavaFX.
- thus, JavaFX is not inherently a part of Java.
- any platform that doesn't support Java would therefore not support JavaFX (....i.e., iPhone, iPad) -- yet.
- note that the iPhone & iPad also don't support Flash, a similar competitor in this space. (...Perhaps Flex or Silverlight are better examples of competing technologies....)
Source(s): Javafx wikiepdia javafx at a glance javafx homepage similar stackoverflow question
I think what you are asking is what are the pros and cons of building a JavaFX desktop application vs a Java Swing desktop application. After experimenting with both I can point out a few differences:
Java Swing:
Pros: - Better visual designer and IDE support - More full featured set of controls - Good for building business applications such as user interfaces on top of a database where you don't need capabilities beyond the standard (and third party) controls.
Cons - Poor multimedia support - Building custom controls or custom skins is very difficult - No animation support - Java syntax can be awkward for building UIs. The IDE makes this less of an issue, but if you ever have to do anything manually it can get ugly.
JavaFX
Pros
- Decent multimedia support
- Easy to build custom controls, and all existing controls are skinnable using CSS (I haven't tried CSS yet though).
- Animation support is good - not quite as good as flash but its good enough for basic animations.
- The syntax seems better suited for building UIs, especially for hand coding them - which is good because you will need to hand code them.
- Good for building multimedia applications or applications where you need a custom look.
Cons
- The visual designer needs work, and personally I don't use it. This can be a big negative depending on your needs.
- Still lacking in some controls, but this is getting better. The controls that do exist seem to work well.
- Swing integration exists, but they are working on changing the engine so that it no longer relies on Swing. It is uncertain how well using Swing controls from JavaFX will work on the future. So I wouldn't avoid the use of Swing controls in JavaFX when possible.