How do I access a JavaFX 1.3 static class member from Java?
Posted
by James
on Stack Overflow
See other posts from Stack Overflow
or by James
Published on 2010-06-07T02:06:37Z
Indexed on
2010/06/07
2:12 UTC
Read the original article
Hit count: 338
I want to access a static JavaFX class member from Java using the Javafx reflection API.
E.g. JavaFX code:
var thing;
class MyJavaFXClass {
}
Java code:
private Object getThing() {
FXClassType classType = FXContext.getInstance().findClass("mypackage.MyJavaFXClass");
// Get static member 'thing' from 'MyJavaFXClass'
// <Insert Code Here>
return thing;
}
What Java code do I need to access 'MyJavaFXClass.thing'?
Note: I am using JavaFX 1.3 - I'm not sure if the reflection API is different here to earlier JavaFX versions.
© Stack Overflow or respective owner