Skip to main content

Using JavaFX in Swing

4 replies [Last post]
ilvisne
Offline
Joined: 2006-07-28

Hello,

There are many examples for using Swing in JavaFX. I know it now.

My Question: Can i develop components with JavaFX and later add them to a JPanel (e.g. myPanel.add(myJavaFXComp) ). Are there examples on the internet?

thanks...
ilhami

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
pforhan
Offline
Joined: 2003-08-07

I added an entry to the jfx wiki on this:
http://jfx.wikia.com/wiki/FAQ#How_can_I_add_JFX_components_to_an_existin...

Note that this applies to the interpreted version, not necessarily the compiled version.

Pat.

goddard
Offline
Joined: 2007-05-14

The question is why would you do that? Possible answer could be that you want to enhance/extend existing application. Anyway, my answer to your question is yes, if you use the JFX compiler to generate .class files for the JFX components.
I recommend you to write it in JFX. Later on, you'll be able to to drag it from browser window onto your desktop and run it as standalone desktop application. at least Sun says that ;)

ilvisne
Offline
Joined: 2006-07-28

Yes, exactly. I have a Netbeans RCP application and want to extend it.

Do you know any example?

thank you.

goddard
Offline
Joined: 2007-05-14

Unfortunately no. But let's see if someone else has.