• 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

JavaFX/ Swing Compatibility?

 
Ranch Hand
Posts: 356
Android Netbeans IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm just curious if there is still issues with Swing and FX being compatible? I have a a project I need to do graphing with, and FX has some cool graphs, which would be cool to use to add to an existing Swing project...

Also is there any Graphing libraries otherwise? I checked Google and it seems like there are a few, but not too sure about any of them... Thoughts?

Thanks!!

~Jay
 
Bartender
Posts: 825
5
Python Ruby Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You might find this interesting to look at.
 
Jay Orsaw
Ranch Hand
Posts: 356
Android Netbeans IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Kemal Sokolovic wrote:You might find this interesting to look at.



Thanks !!!
 
Kemal Sokolovic
Bartender
Posts: 825
5
Python Ruby Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You're welcome.
 
Jay Orsaw
Ranch Hand
Posts: 356
Android Netbeans IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Kemal Sokolovic wrote:You're welcome.



One thing I've been noticing is that you need to edit your swing code in FX style code with scenes and such? I tried to add an FX class to a SE project and it wouldn't work, even with the FX platform.. I tried to add all of my code to an FX project, which my FX code showed the imports as correct now, however it wouldn't run anything........ >(
 
Rancher
Posts: 387
30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
> I tried to add all of my code to an FX project, which my FX code showed the imports as correct now, however it wouldn't run anything

Try using the JavaFX packaging tasks to package your Swing app with embedded JavaFX:
http://docs.oracle.com/javafx/2/deployment/deploy_swing_apps.htm#BACFDACD

There is also a JavaFX/Swing Interop example (with source code and a NetBeans project which builds out of the box) you should refer to if you have further issues:
http://www.oracle.com/technetwork/java/javafx/samples/index.html
 
Jay Orsaw
Ranch Hand
Posts: 356
Android Netbeans IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

John Damien Smith wrote:> I tried to add all of my code to an FX project, which my FX code showed the imports as correct now, however it wouldn't run anything

Try using the JavaFX packaging tasks to package your Swing app with embedded JavaFX:
http://docs.oracle.com/javafx/2/deployment/deploy_swing_apps.htm#BACFDACD

There is also a JavaFX/Swing Interop example (with source code and a NetBeans project which builds out of the box) you should refer to if you have further issues:
http://www.oracle.com/technetwork/java/javafx/samples/index.html




I think I figured it out.... Will update.


Edit: One thing that has been bothering me is that I cannot run my applet when I made JavaFX package. Apparently the fx code only works in those packages... So I was thinking can I import the files as a jar and use them in my none FX package, or will it not work? It wont work with having the FX JDK as my choice either.... .


When I add my files into the FX Package I get this error for images




I'm able to switch it back to the actual file path and it works... STUPID NETBEANS error .
reply
    Bookmark Topic Watch Topic
  • New Topic