28.04.2013
How to use and extend the library JFXtras.
This article describes how to compile the latest version of the JFXtras library in your own IDE so it is possible to debug directly into the source code and make changes which can be contributed to the project. I describe several ways to import and build the JFXtras library with Netbeans, Eclipse, Gradle, the e(fx)clipse plugin and the Eclipse Gradle Integration. Also I explain how to use Git to fork and clone the repository so you can contribute new components or bug fixes to the project...
29.03.2013
JavaFX - Fractal: The Mandelbrot and the Julia Set.
The following article describes how to paint the Mandelbrot and the Julia set with JavaFX. Also I explain how to change the colors of the graphical representations of the sets. Additional the look of the Julia set can be changed by adapting the function values...
22.03.2013
How to get a list of all JavaFX color names which are pre-defined in the class Color?.
The class javafx.scene.paint.Color in JavaFX has a lot of pre-defined static color names. The usage is very simple, e.g. Color.BLUE. But how do you get a list of all these color names which are defined in the class Color? This article describes a way which uses the Java Reflection API to create a list with all these color names...
21.03.2013
JavaFX - Mandelbrot Set.
The following short article describes how to paint a Mandelbrot set with JavaFX. The Mandelbrot set will be painted into a javafx.scene.canvas.Canvas with the methods GraphicsContext.setFill() and GraphicsContext.fillRect()...
17.03.2013
JavaFX - Dartboard with Shapes (Path, Arc, ArcTo, Circle) and Text.
The following article describes how to paint a dartboard with JavaFX. This article tries to describe how to use primitive shapes to paint a complex Scene with JavaFX. A side-effect is that you will learn how to use trigonometric functions like sine and cosine and place points at an arbitrary position on a circle. In the example, a Scene is created which contains some javafx.scene.shape.Circle objects, javafx.scene.shape.Arc...
14.03.2013
JavaFX - Animation of Circles with a Timeline.
The following article describes how to animate objects in JavaFX. In the example, a Scene is created which contains some objects (javafx.scene.shape.Circle-Objects) which are flying around an imaginary middlepoint. The animation is realized with a JavaFX javafx.animation.Timeline and javafx.animation.TranslateTransitions to move the objects from one point to the next position around the orbit. The objects are styled by a CSS file which defines a...
06.03.2013
Game of Life mit JavaFX.
In dem folgenden Beispiel wird mit JavaFX eine einfache Oberfläche für Game of Life erstellt. Die Zellen werden mit javafx.scene.layout.StackPanes realisiert, die innerhalb eines javafx.scene.layout.Pane angeordnet sind. Die StackPane-Objekte werden mittels eines javafx.scene.layout.StackPaneBuilder erstellt. Die Anmination wurde mit einer javafx.animation.Timeline umgesetzt...
05.03.2013
Ein Schachbrett mit javafx.scene.shape.Rectangle und CSS-Styling.
In dem folgenden kleinen JavaFX-Beispiel wird ein Schachbrett mit den Klassen Rectangle und dem RectangleBuilder erstellt. Das Aussehen der schwarzen Felder wird über eine CSS-Datei gesteuert. Zu Einsatz kommen außerdem noch die JavaFX-Klassen Application, Pane, Scene und Stage...
