aspose file tools*
The moose likes JavaFX and the fly likes JavaFX 2.0 problem in integrating into GUI Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JavaFX
Bookmark "JavaFX 2.0 problem in integrating into GUI" Watch "JavaFX 2.0 problem in integrating into GUI" New topic
Author

JavaFX 2.0 problem in integrating into GUI

Tan Joey
Greenhorn

Joined: Jun 23, 2011
Posts: 8

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

Joined: Sep 08, 2007
Posts: 3071
    
  33

What JDK version are you using?
What is the error which is being report? >> ItDoesntWorkIsUseless

Mohamed Sanaulla | My Blog
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4658
    
    5

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.


luck, db
There are no new questions, but there may be new answers.
Tan Joey
Greenhorn

Joined: Jun 23, 2011
Posts: 8

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

Joined: Sep 08, 2007
Posts: 3071
    
  33

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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: JavaFX 2.0 problem in integrating into GUI