• 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
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

JavaFX 2.0 problem in integrating into GUI

 
Greenhorn
Posts: 8
Eclipse IDE MySQL Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all, I am trying to integrate a web browser into my java swing GUI, I have enlisted the help in another post asking how to do it over here:
"https://coderanch.com/t/542889/GUI/java/Opening-website-like-facebook-or"

I have tried installing the JavaFX 2.0 sdk into my system,however it still does not work, I have also tried the JavaFX 1.3 sdk and it integrated fine.
However, some of the codes required to run a web browser in my GUI is only supported in the 2.0 sdk. I have searched online and since JavaFX is relatively new, not many people have alot of help on this topic. I have also tried to link the jfxrt.jar file from the sdk into my project's Classpath but it does not work. I am currently using eclipse Helios, any help will be appreciated thank you.
 
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
What JDK version are you using?
What is the error which is being report? >> ItDoesntWorkIsUseless
 
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
In JavaFX 1.3 you can add a Swing component to a JavaFX GUI using the SwingComponent class. More here: How do I combine JavaFX and Swing?

With JavaFX 2.0, it's the reverse. You can add a FX2 Scene housed in a JFXPanel to a Swing GUI. More here: Integrating JavaFX into Swing Applications.

Note that JavaFX 2.0 is in beta and the (fairly buggy and incomplete) runtime is presently available only for Windows platforms. Also, the only supported build process is via the NetBeans 7 plugin. Also, I think NetBeans 7 isn't compatible with the JavaFX 1.x plugin -- for that you need NetBeans 6.8/6.9 (not sure if earlier versions support it).

One bug you may encounter if you go the 2.0 way is that the program doesn't exit without a call to System.exit(0); More here: JFXPanel can cause the program to not exit.
 
Tan Joey
Greenhorn
Posts: 8
Eclipse IDE MySQL Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Mohamed Sanaulla wrote:What JDK version are you using?
What is the error which is being report? >> ItDoesntWorkIsUseless



hello,i am pretty sure i repeated it many times i am currently using JavaFX 1.3 however i tried using 2.0 but it does not integrate.
sorry if i wasnt clear about it,but i said "However, some of the codes required to run a web browser in my GUI is only supported in the 2.0 sdk"
certain imports are only usable in 2.0.
 
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
JavaFX version and the JDK version are 2 different things. You can check for your JDK version by using the command- javac -version.
Web browser component is available only from JavaFX 2 onwards. And there's a drastic different between JavaFX 1.3 and JavaFX 2 and the imports are surely not going to match between the two versions.
1. We want you to post the code you are trying
2. we want you to tell us what issue you are facing- in terms of the exception stacktrace (if any) or some error message. Just saying it doesnt work- we really cannot find out what issue you are facing.
 
What's brown and sticky? ... a stick. Or a tiny ad.
New web page for Paul's Rocket Mass Heaters movies
https://coderanch.com/t/785239/web-page-Paul-Rocket-Mass
reply
    Bookmark Topic Watch Topic
  • New Topic