FX Experience Has Gone Read-Only

I've been maintaining FX Experience for a really long time now, and I love hearing from people who enjoy my weekly links roundup. One thing I've noticed recently is that maintaining two sites (FX Experience and JonathanGiles.net) takes more time than ideal, and splits the audience up. Therefore, FX Experience will become read-only for new blog posts, but weekly posts will continue to be published on JonathanGiles.net. If you follow @FXExperience on Twitter, I suggest you also follow @JonathanGiles. This is not the end - just a consolidation of my online presence to make my life a little easier!

tl;dr: Follow me on Twitter and check for the latest news on JonathanGiles.net.

Announcing SceneBuilder 2.0

Announcing SceneBuilder 2.0

Amazing news everyone, SceneBuilder 2.0 is released today. It has many cool new features and was a complete rewrite from the ground up so that it can be split into parts and embedded in your favorite IDE.

Download

Mo has put up a great video tutorial for SceneBuilder 2 on YouTube: Watch

Scene Builder 2

Whats New

  • JavaFX Scene Builder Kit. JavaFX Scene Builder Kit is an API that allows the integration of Scene Builder panels and functionalities directly into the GUI of a larger application, or a Java IDE, such as NetBeans, IntelliJ, and Eclipse. See Working with the JavaFX Scene Builder Kit for more details.
  • Ability to add custom GUI components to the Library. Custom components imported from a third party JAR file can now be added permanently to the Library of available GUI components. See Adding Custom Components to the Library for more information.
  • Support for new JavaFX 8 UI components. The new UI components, TreeTableView, DatePicker, and SwingNode, that were introduced in the Java SE 8 are now supported in Scene Builder 2.0. To see the list of JavaFX 8 UI components that are available, type FX8 in the Library panel’s search text field.
  • 3D Support. FXML documents containing 3D objects can now be loaded and saved in the Scene Builder tool. You can view and edit properties of the 3D objects using the Inspector panel. You can not, however, create new 3D objects using the Scene Builder tool. See JavaFX Scene Builder User Guide for more information.
  • Support for Rich Text. A new container, TextFlow, is now available in the Library of GUI components. You can drag multiple text nodes and other types of nodes, into the a TextFlow container. You can also directly manipulate the text nodes to re-arrange them in the container. Inline and property editing features are also available for each text node.
  • Library Panel Improvements. The default viewing option for the Library panel is a new feature that gives you the option to view all the component categories as collapsible sections.
  • Hierarchy Panel Improvements. It is now more flexible to re-parent objects from one container to another container. It is also possible to drag and drop an object from the Hierarchy Panel to the Content Panel, and vice versa. You can also now select multiple objects in the Hierarchy Panel in order to re-parent them.
  • Content Panel Improvements. You can now manipulate the components of an HBox, VBox, FlowPane, or Toolbar container directly in the Content Panel to re-order them. You can also insert a new component at any position in the container. Note that this direct manipulation is currently not available for the TilePane container.
  • Inspector Panel Improvements. Many property editors in the Inspector panel use the Suggested List dialog window, which displays a list of selectable values from which you can make a selection instead of manually entering them. For example, the CSS Style editor provides a list of applicable CSS properties, based on the currently selected object(s). List handling has also been simplified. Multi-selection of components of different types (i.e. Button + TextField) is now supported. In addition, the usability of many of the property editors, such as AnchorPane Constraints, Rotate, and Padding, have been improved.
  • Preview Window Improvements. The content in the Preview window is now automatically refreshed as the current FXML document is being edited. Hence, there’s no need to use the Refresh command in order to preview the modified UI layout.
  • Change in the Include FXML Command. When you click File from the Menu bar and then click Include, you can only select the FXML menu item if the current FXML document you are editing is saved on your system’s disk and is not empty.

 

Announcing: ControlsFX 8.0.0 Final

Announcing: ControlsFX 8.0.0 Final

It hasn’t quite been four weeks yet, but I’m already back to announce the availability of the final release of ControlsFX 8.0.0. This release is a combination bug fix and feature release, having gone through only one (proper) developer preview release (there was supposed to be a developer preview 2 release, but due to issues deploying the build we had enough time to fix up the remaining bugs / features and now we’re at the final release! 🙂 ). A huge number of bugs have been fixed, in particular related to dialog layout. It is highly recommended that people use JavaFX 8.0 b91 or above when running ControlsFX.

For more information on what ControlsFX is, who it is aimed at, how to get it / use it / contribute back to it, you should refer to the ControlsFX page. A few things to note are:

  1. This release of course includes all the features that were in developer preview 1. If you aren’t familiar with that release, be sure to check out the blog post for that release!
  2. I clarified the (slightly odd) approach to release versioning for ControlsFX over on the ControlsFX page (scroll down to the ‘Release Versioning’ section). In short, we use the common x.y.z numbering scheme, where the x.y values represent the minimum JavaFX version required, and the z value represents the release. In our current case, ControlsFX 8.0.0 is still being developed, and requires at least JavaFX 8.0. Future releases will increment to 8.0.1, 8.0.2, and so on until we require JavaFX 8.1 or whatever version comes after JavaFX 8.0. In short, despite 8.0.0 being a big version jump (it’s the first release after all!), we plan to increment only the .z value for a very long time! 🙂
  3. Visit the bitbucket project to watch (or fork) the project. If you fork please consider providing pull requests so that ControlsFX continues to improve!

To conclude this post, here’s a quick rundown on the new features included in this final 8.0.0 release:

(more…)

Announcing Scenic View 8.0.0 Developer Preview 3

I’m very pleased to make available the third developer preview release of Scenic View 8.0.0. This release hopefully improves the Mac OS support which has been at times difficult to implement (simply due to the nature of what Scenic View needs to do under the hood). This release includes improvements from Danno Ferrin (in particular he redid the build system in gradle), and thanks must go to Danno, Gerrit Grunwald and Sven Reimers for offering to test and give feedback on Scenic View 8.0.0 builds on their respective machines. This has certainly helped to improve the reliability of Scenic View. Now I turn to the wider community to offer your feedback! Please leave comments in the comments section below with your findings (even reports that it works successfully are appreciated!).

Scenic View has been somewhat neglected recently as my focus has been on my day job (it’s keeping me rather busy), and on building out ControlsFX. My hope is to find time to bring Scenic View back up on JavaFX 8.0, but I’m relying on feedback from users about what is and is not working. If anyone has time to seriously contribute to development of Scenic View, I am also happy to work with you on it.

The Scenic View download is in its usual place, and because I get given grief if I don’t say what Scenic View is, here is the executive summary: Scenic View is a JavaFX application designed to make it simple to understand the current state of your application scenegraph, and to also easily manipulate properties of the scenegraph without having to keep editing your code. This lets you find bugs, and get things pixel perfect without having to do the compile-check-compile dance.

Thanks!

Announcing: ControlsFX

Announcing: ControlsFX

I’ve been hinting at this project for a really long time, and I’m finally ready to take the wraps off of it. I am incredibly pleased to announce the immediate availability of the first developer preview release of the brand new ControlsFX project. You can visit the ControlsFX page for all the details on how to download, use and contribute.

This has been a long-running project that has recently gained steam thanks to a number of contributors helping out. Over time I’ll call them out in more detail (and perhaps with interviews), but today the main people I’d like to thank are Eugene Ryzhikov, Hendrik Ebbers, and Danno Ferrin.

To conclude this post, I’m copy/pasting the new features documentation from the ControlsFX page into the remainder of this blog post.

(more…)

February Open Source Update

We’ve been making progress in getting JavaFX open sourced. I wanted to take a few minutes to include this information on fxexperience (since many of you aren’t watching the mailing list). Oh, and you might want to read this one, there is some big news at the end of the post 😉

Late last year at JavaOne our Executive VP Hasan Risvi announced at JavaOne that we would be open sourcing all of JavaFX by the end of 2012. We didn’t quite make that (actually, it was a pleasant surprise to me as the announcement was made as much as to everybody else in the audience!). We quickly got into gear and started the substantial effort that goes into open sourcing each project. We have a lot of code. The following projects have already been open sourced as of this writing:

(more…)

JavaFX on Raspberry PI

JavaFX on Raspberry PI

BrickBreaker running on a Raspberry PI

BrickBreaker running on a Raspberry PI

Today Oracle has released the first JavaSE 8 + JavaFX Developer Preview. This is really exciting for anybody who’s wanted to try out the $35 Raspberry PI ARM mini-computer (and I do mean mini!). Incidentally, anybody who picks one up really needs to get the Pi-Bow enclosure for the PI — I got one yesterday and highly recommend it!

JavaSE is a HotSpot based VM, so it is really quite zippy. I did some timing calculations on my PI this morning based on the prime number test provided in this Raspberry PI Java forum posting. Yes, there is a new Java category on the Raspberry PI forums, do visit and leave your experiences there :-). Anyway, I ran both Java and GCC version 4.6.3 with -O2 performance optimization enabled.

Test Real User Sys
JavaSE 8 (build 1.8.0-ea-b36e) 0m7.830s 0m4.970s 0m2.840s
GCC 4.6.3 (Debian 4.6.3-12+rpi1) 0m7.716s 0m4.990s 0m2.700s
GCC 4.6.3 (Debian 4.6.3-12+rpi1) -O2 0m6.361s 0m3.940s 0m2.400s

I find the results really impressive, because basically the difference seen between Java and native is just due to the startup costs. Which means that Java is a really great choice for developing applications that will run on the Raspberry PI. Java also represents (to my knowledge) the first VM stack to optimize for hard float on ARM v6.

I couldn’t help myself though, I cranked up the test to find all prime numbers below 50,000 to see if the startup costs in fact are the difference between the JVM and native code. Below are the results. As you can see, HotSpot is faster than native code!

Test Real User Sys
JavaSE 8 (build 1.8.0-ea-b36e) 1m37.808s 1m25.570s 0m12.000s
GCC 4.6.3 (Debian 4.6.3-12+rpi1) 2m18.875s 2m7.390s 0m11.1300s
GCC 4.6.3 (Debian 4.6.3-12+rpi1) -O2 1m42.166s 1m31.206s 0m10.580s

I wrote a quick JavaFX application this morning and tried it out. A couple things to make sure you note!

  • jfxrt.jar is not on the classpath by default (yet). So be sure to include it!
  • -Djavafx.platform=eglfb must be specified. If not, it won’t run.
  • Ahem. There appears to be no way to kill an FX app, unless you can SSH into your box or switch to another terminal. Or have your app make sure it has an exit button. But then, when playing BrickBreaker, who’d ever want to stop?

None of the flags used in javaFX on the command line are “public API” and may go away in the future, but this particular flag is likely to be around for a while. It lets you choose which version of glass to run with. On Raspberry PI, right now, the only option is eglfb (which makes you wonder why we require you to specify it on the command line. There are some questions that we just shouldn’t ask ;-)). Basically EGLFB runs OpenGL on the frame buffer directly, meaning that it wants to own the entire screen. This is great for Kiosks and media centers and such, but not so good for normal X11 usage. Hopefully the X11 usage shows up sometime soon, but in the meantime, JavaFX will own the display.

You should go read the developer preview documentation and also Stephen Chin’s blog on PI. JFokus has a Raspberry PI hands on lab, which is already fully booked, but I’m betting you can get Simon Ritter to give you some material if you want to try at home :-).

Have fun hacking over the holidays!