Is it possible to use JavaFX with MPS 3.4?

Is it possible to use JavaFX with MPS 3.4?
I am getting error while using java fx with MPS 3.4 and java version 1.8

0
9 comments

Yes but MPS does not expose the stubs for javafx, so what I did was using javafx in an external project, build a jar and create stubs for that jar. I did not exposed any javafx class in the API

0

Thanks for your response Federico Tomassetti.
Just want to ask if your work (Exposing javafx stub api for MPS) is Open source. :)

0

This particular thing is not, unfortunately. However I hope in the future to be able to release a small example of using JavaFX from MPS as an open-source project.

0

 

I m using FX from jdk 8 in mps simply by importing the jfxrt.jar as stub in the solution where all the fx8 code is placed.

 

0

Thanks for your response @daniel nut can ask you how you are getting java fx classes displayed in your MPS class editor. For example javafx's "Application" class

0

What do you mean by Class Editor? If you want to use the Application class in some of your code, just simple add jfxrt.jar in your solution as java stub and import (crtl r) the Application in your mps solution model......

0

@Daniel: That is the problem, i am not able to do it, can you please explain me how to do it.



1

Use extends Application and not implements, since Application is not a java interface.

1

Ahh,l am so sorry, yes you correctly identified the problem. Thanks

0

Please sign in to leave a comment.