Forums Register Login

JavaFX and a Timeline ?

+Pie Number of slices to send: Send
Hi!

I have an idea for an application for my alotment and I wonder if JavaFX could be the "silver bullet" here.
I would like to create a simple canvas that emulates my alotment with my vegetables + sunflowers.
The timeline would for instance strech from early april to end of september.
The application would have a canvas showing the alotment : 10 x 13 meters.
I am able to plot a number of icons on the canvas: such as all the sunflowers.
The sunflower has 4 stages which describes the sunflowe lifecycle under good circumstances :
small-medium-max-dead and each stages has an Icon ( small yellow circle, medium yellow circle, large yellow circle and finally a brown medium circle ).
So if a plant 30 sunflowers on different dates I can 'play' the simulation and see hos they grow and die.

Is this possible ?

regards, i
+Pie Number of slices to send: Send
Sure!
If you are familiar with Java2D or HTML5 Canvas you could use the JavaFX Canvas Control. In this control you can paint whatever you want on a graphics canvas. Here is a quick overview: http://docs.oracle.com/javase/8/javafx/graphics-tutorial/canvas.htm#JFXGR214
My book contains an example, too.
But the better approach is to use the JavaFX scene graph. The scene graph can contain, layout, manage and render all your components. By doing so you can add event listeners, etc. on all the components. How the scene graph is working and how you can define own layouts, etc. is part of my book
+Pie Number of slices to send: Send
Hi!

Thanks Hendrik for your reply and the oracle-link.
Must take a look at this book, would love to learn this.

regards, Ingo
There's a way to do it better - find it. -Edison. A better tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1170 times.
Similar Threads
Creating large circles that move towards the nearest small circle with StdDraw?
JSlider issue
olive oil
Becoming a Hardman
40 hour week
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 09:40:17.