JavaFX : JfxFrame

Hi all,

I have developed a JfxFrame for JavaFX for my own needs. Now you can have your JavaFX code without a JavaFX application. I share it as it might interest others. Please find below a small code sample.

 

To use it you have to download Ermine.jar

Of course you can create several frames, just by allocating and displaying several instances.

At first glance, it looks like the old Swing or AWT frame, but it is a bit different as it is coming with a callback method which is executed inside the correct JavaFX Thread. I have created such frame not by nostalgia but for having a class containing main without JavaFX application. This way you can use JavaFX everywhere inside your own architecture and not only from a class with JavaFX’s main.

In my opinion the JavaFx code should be a leaf in architecture as other application parts like data processing, database access, network server etc..

To create this frame, I had to add a method known by Swing coder invokeAndWait that might also interest some JavaFX coders :

Next time I will present you new features of RefPointLayout.

Cheers.

Mik