• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Java FX in Swing!

 
Bartender
Posts: 5167
11
Netbeans IDE Opera Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Bartender
Posts: 3225
34
IntelliJ IDE Oracle Spring Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 5167
11
Netbeans IDE Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Bartender
Posts: 3225
34
IntelliJ IDE Oracle Spring Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Agree with you. Now that we need not learn a new syntax for JavaFX
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Bartender
Posts: 3225
34
IntelliJ IDE Oracle Spring Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 5167
11
Netbeans IDE Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic