• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java FX in Swing!

 
Darryl Burke
Bartender
Posts: 5133
11
Java Netbeans IDE Opera
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Integrating JavaFX into Swing Applications

Interesting to note that FX has its own 'User' Thread, separate from the EDT. That is going to lead to an awful lot of invokeLater / runLater calls in a mixed application though.

Apart from that the usage appears to be fairly seamless, though the article isn't clear on whether Swing components can be added to a FX container (probably not!), nor how one would add more than one JFXPanel to the same Swing GUI.
 
Mohamed Sanaulla
Saloon Keeper
Posts: 3159
33
Google App Engine Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Darryl Burke wrote:Integrating JavaFX into Swing Applications

Interesting to note that FX has its own 'User' Thread, separate from the EDT. That is going to lead to an awful lot of invokeLater / runLater calls in a mixed application though.

Apart from that the usage appears to be fairly seamless, though the article isn't clear on whether Swing components can be added to a FX container (probably not!), nor how one would add more than one JFXPanel to the same Swing GUI.

This would help add JavaFX charts to the Swing and not rely on external APIs.
 
Darryl Burke
Bartender
Posts: 5133
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, technically JavaFX is even more of an 'external API' than JFreeChart inasmuch as it requires its own runtime, not just a jar on the classpath. Also, it's presently Windows-only, not cross platform.

That said, I'm looking forward to learning more of FX 2.0 than I ever did JavaFX Script.
 
Mohamed Sanaulla
Saloon Keeper
Posts: 3159
33
Google App Engine Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Agree with you. Now that we need not learn a new syntax for JavaFX
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Darryl Burke wrote:Well, technically JavaFX is even more of an 'external API' than JFreeChart inasmuch as it requires its own runtime, not just a jar on the classpath.

I was hoping that it would become a regular external library like JMF - drop the jar file into the classpath, and start using it. Do you think it will be more complicated than that?
 
Mohamed Sanaulla
Saloon Keeper
Posts: 3159
33
Google App Engine Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer wrote:
I was hoping that it would become a regular external library like JMF - drop the jar file into the classpath, and start using it. Do you think it will be more complicated than that?


It has got different rendering engine for the components. Also a media engine, web engine for showing html content (Architecture). So its a run time which sits on top of the JVM. My guess is JavaFX runtime would be bundled with the newer releases of the JRE.
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mohamed Sanaulla wrote:It has got different rendering engine for the components. Also a media engine, web engine for showing html content (Architecture). So its a run time which sits on top of the JVM.

I don't understand how that implies that it needs to be any different than some other random jar file you drop in the classpath?
 
Darryl Burke
Bartender
Posts: 5133
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I haven't downloaded the early access release, but there has to be some native component (probably in the form of a DLL or DLLs) which is why it's available only for Windows.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic