DEV Community

Krusharth Shah
Krusharth Shah

Posted on

1

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)

Image of Timescale

Timescale – the developer's data platform for modern apps, built on PostgreSQL

Timescale Cloud is PostgreSQL optimized for speed, scale, and performance. Over 3 million IoT, AI, crypto, and dev tool apps are powered by Timescale. Try it free today! No credit card required.

Try free

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay