• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JavaFX 2.0 problem in integrating into GUI

 
Tan Joey
Greenhorn
Posts: 8
Eclipse IDE Java MySQL Database
  • 0
  • Mark post as helpful
  • send pies
  • 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:
"http://www.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.
 
Mohamed Sanaulla
Saloon Keeper
Pie
Posts: 3159
33
Google App Engine Java Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What JDK version are you using?
What is the error which is being report? >> ItDoesntWorkIsUseless
 
Darryl Burke
Bartender
Posts: 5115
11
Java Netbeans IDE Opera
  • 0
  • Mark post as helpful
  • send pies
  • 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 Java MySQL Database
  • 0
  • Mark post as helpful
  • send pies
  • 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
Saloon Keeper
Pie
Posts: 3159
33
Google App Engine Java Ruby
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic