I'm writing a JavaFX application with Eclipse in Linux and, using SceneBuilder, I work out a certain FXML code. When I move to windows, if I try to execute the code it runs fine but if I try to modify the fxml file it starts to give me an error (not related to the modifications). I also tried using NetBeans but nothing changed.
The error is :
javafx.fxml.LoadException: Light.Distant is not a valid type.
while the code giving error is:
<Circle fx:id="check_credit" centerX="195.0" fill="#0d6615" layoutX="8.0" layoutY="150.0" radius="8.0" stroke="TRANSPARENT" strokeLineCap="ROUND" strokeType="INSIDE">
<effect>
<Lighting bumpInput="$null">
<light>
<Light.Distant />
</light>
</Lighting>
</effect>
</Circle>
What could be the cause? Thank you in advance.
You are missing the import from your FXML file:
<? import javafx.scene.effect.Light.Distant ?>
Ok I fix it using
<?import javafx.scene.effect.*?>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With