JavaFX - "plasticine crow"
The first impressions of JavaFX are of course chaotic. The product is quite interesting. The programming syntax is formed from a mixture of Java and JavaScript. After writing my first full-fledged application, I got the impression of a “plasticine language”. In my opinion, it turned out to be a very flexible syntax. Remember what were the transformations in the cartoon "plasticine crow"? JavaFX can do something similar.
A couple of interesting examples
When defining the properties of an object, you can separate them with a comma or you can use a space, or you can not separate them at all! (experimentally calculated)
translateY: 5,
width: 330
translateY: 5 width: 330
translateY: 5width: 330
all three code examples work identically.
Convert Swing Components
The following example intrigued me very much. Convert standard javax.swing.JProgressBar to javafx component
var progressBar = new JProgressBar (0, 100);
progressBar.setStringPainted (true);
var comp = SwingComponent.wrap (progressBar);
all !, now comp is a javafx component. In fact, in this way you can use any standard component (this is my unverified assumption).
Creating a file selection dialog
Simpler than steamed turnips
var chooser = new JFileChooser
// or var chooser = new JFileChooser ()
// or var chooser = JFileChooser {}
chooser.showOpenDialog (null);
My new jigsaw
In general, my first impressions are very positive. With the current power and richness of Java libraries, we got new additional syntax and functionality.
A working example of a JavaFX-based SimpleUploader file downloader along with the source.
It will be difficult to predict how the future of JavaFX will develop. I know one thing - another convenient “jigsaw” has appeared in my tool kit, which I hope will not get dusty.