File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JavaFX and the fly likes JavaFX and a Timeline ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JavaFX
Bookmark "JavaFX and a Timeline ?" Watch "JavaFX and a Timeline ?" New topic

JavaFX and a Timeline ?

Ingi Erlings

Joined: Nov 21, 2013
Posts: 8

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
Hendrik Ebbers
Ranch Hand

Joined: Jun 24, 2014
Posts: 32
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:
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

[Mastering JavaFX 8 Controls]
Ingi Erlings

Joined: Nov 21, 2013
Posts: 8

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

regards, Ingo
I agree. Here's the link:
subject: JavaFX and a Timeline ?
It's not a secret anymore!