java - Get Application class from event -



i'm building app javafx 2.x. main method in class frame, extends javafx application. controller binded fxml template has event (button click), classof actionevent.

question is, how of linked? wanna applicaiton instance (frame) event.

i've dirty , ugly solution (static function set/get app instance).... there cleaner way?

thanks

p.s. i know, how scene, stage (window?), don know, "where" instance of application (place, main());
p.p.s i'm n00bee in javafx technology

use static getter returning application instance application subclass (as have implemented it).

i think other potential solutions end clunkier.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -