views:

492

answers:

1

I just saw a article on swing being used in JavaFX. How can an application that uses a jFrame to display graphics be ported into JavaFX? Also, will the jButtons and jSliders work in the normal manner?

I know this is a generic question but I know little of JavaFX and am curious about porting some desktop applications to the web via the JavaFX package.

+1  A: 

// javafx file

import javax.swing.JComponent;

import javafx.ext.swing.SwingComponent;

class NewFxComponent extends SwingComponent

{

var comp: JComponent;

public override function createJComponent():JComponent
{
    return new OldJComponent();
}

}

l_39217_l