aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Java FX in Swing! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Java FX in Swing!" Watch "Java FX in Swing!" New topic
Author

Java FX in Swing!

Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4658
    
    5

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.


luck, db
There are no new questions, but there may be new answers.
Mohamed Sanaulla
Saloon Keeper

Joined: Sep 08, 2007
Posts: 3071
    
  33

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.


Mohamed Sanaulla | My Blog
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4658
    
    5

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

Joined: Sep 08, 2007
Posts: 3071
    
  33

Agree with you. Now that we need not learn a new syntax for JavaFX
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42611
    
  65
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?


Ping & DNS - my free Android networking tools app
Mohamed Sanaulla
Saloon Keeper

Joined: Sep 08, 2007
Posts: 3071
    
  33

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
Marshal

Joined: Mar 22, 2005
Posts: 42611
    
  65
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

Joined: May 03, 2008
Posts: 4658
    
    5

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.
 
 
subject: Java FX in Swing!