DEV Community

Krusharth Shah
Krusharth Shah

Posted on

Animating using sliders in JavaFX and SceneBuilder

Hello All! I am a beginner in Java. For my project, I am developing a GUI using JavaFX in Eclipse (I have connected Java with SceneBuilder). I have 2 sliders named Diameter (D1) and Length (L1). Secondly, I have a cylinder with 2 dimensions i.e. diameter (D2) and Length (L2). The task that I want to do is when I change the values in slider of D1, corresponding D2 should change (increase/decrease). And the same way with Length also. But I don´t know how to connect the sliders with the cylinder. Maybe I should use changeListener for this. If anyone can give me a slightest idea of implementing this, it would be very helpful! Looking forward to your help, thank you in advance!

Top comments (0)