by Jonathan Giles | Dec 30, 2012 | Links
Welcome to the last JavaFX links of the week for this year! Obviously with the festive season in full swing this week is a relatively quiet week, but nonetheless I have some interesting links for you to read. Enjoy, and have a good new years and start to 2013! Catch you in a weeks time! 🙂
- Stephen Chin has announced his plans to go on another night hacking tour, this time taking in the Nordic countries between January 25 and February 7.
- I was given a (virtual) clip around the head by Ed Thompson for his issues when dealing with the JavaFX ComboBox control. Fortunately most issues are on their way towards being resolved, and as always I’d love to work with people feeling pain in any UI control to develop improvements and / or review patches based on the OpenJFX source code.
- Hendrik Ebbers has started playing with JavaFX on Raspberry Pi. He has been investigating using DataFX and GridFX on it, and has posted some videos to show progress.
- Andy Till has open sourced a JavaFX application that he has been developing called EstiMate.
- Narayan Maharjan has posted part two of his 3D Object (cube) ‘concept to code’ series of posts.
- Thierry Wasyl continues to develop his DrawFX application, and has posted an update with his latest progress.
That’s all for this year – catch you all again next year when we do it all over again! 🙂
by Jonathan Giles | Dec 23, 2012 | Links
It’s Christmas eve here and there is a huge number of links, so please excuse the brevity – I want to get back to family and food! 🙂
JavaFX
- Pavel Safrata announced that a bunch more JavaFX code was open sourced this week, including animations, timelines, the scenegraph interface and prism implementation, etc.
- The developer preview of Scene Builder 1.1 b15 is now out, with support for Linux. You can read the release notes to learn what is new in the 1.1 release cycle.
- Dolphin 0.4 has been released. Check out the changes.
- The December issue of JAX Magazine has an article written by Johan Vos on DataFX.
- Danno Ferrin has updated his approach to mirroring the OpenJFX project on bitbucket.
- Jim Weaver has posted a video showcasing a number of features contained within the JFXtras project.
- Bruno Borges has posted a video of his WebFX project, which is essentially a JavaFX-based web browser that can browse both HTML and FXML ‘websites’.
- Marco Jakob has posted part six in his series of tutorial blogs for JavaFX, this time focusing on JavaFX deployment with e(fx)clipse.
- Additionally, Marco has three further posts this week, with the following titles: “JavaFX Event Handlers and Change Listeners“, “JavaFX TableView Cell Renderer” and “JavaFX TableView Filter“.
- Patrick Moule has posted about “Building and packaging of JavaFX applications with Gradle“.
- Ed has posted “JavaFX from the Trenches – Part 1 – Native Packaging“. Note that the article is split over five pages.
- Canoo have announced that they are offering JavaFX consulting and training.
- TiwulFX has put up a website and video of their improvements to the JavaFX TableView control.
- Leon Atherton has posted about “Integrating JavaFX with Swing: The JFXPanel“.
- Toru Takahashi has a page detailing building a standalone JavaFX JAR consisting of multiple jar files.
- Thierry Wasyl has posted two videos of his DrawFX prototype.
- There are a few posts this week related to JavaFX being used in alternative languages. Sanshiro Yoshida has a post about tic-tac-toe written in Clojure, cocoatomo has a post about using JavaFX from Jython, and Asko K has posted about “adding ‘condapply’ to Scala, for natural JavaFX bindings“.
- Terada Yoshio has posted about building a Java EE 7 WebSocket client sample application with JavaFX.
JavaFX and Raspberry Pi
Wow, that took a long time to write! Catch you all again next week – and I wish you all a great festive season.
by Richard Bair | Dec 18, 2012 | News
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!
by Jasper Potts | Dec 18, 2012 | CSS
Google has been kind enough to pull together a collection of great free fonts at http://www.google.com/webfonts. For ages I have wanted a easy way to use these in my JavaFX applications. This week I added basic support to JavaFX for CSS @font-face support (see RT-10343). It should be going into JDK 8-b69 which will be available later this week.
(more…)
by Jonathan Giles | Dec 16, 2012 | Links
2012 is rapidly running out, but fortunately the number of links (and the quality) continues to rise. 2013 looks like it might be a very good year for desktop Java at this rate! Keep up the great work folks:-)
- As mentioned last week, there is a survey up on FX Experience about JavaFX on embedded, mobile and tablet devices. If you are reading this, regardless of whether you are a JavaFX developer or interested in targeting these kinds of devices, please (please please!) give us 5 minutes to record your thoughts in the survey – it is much appreciated.
- Java 7u10 was released this week, which includes JavaFX 2.2.4. As per usual, along with the release comes a new release of JavaFX documentation.
- To aid people working on the FX Game project (which is currently focused on building a Tower Defense game), Daniel Zwolenski has started up a Google group mailing list. If you’re interested in taking part, head over there, sign up and introduce yourself!
- Danno Ferrin is working on an interesting application that renders text formatted with the plain text MarkdDown syntax using the TextFlow feature of JavaFX.
- Tom Schindl continues to be very busy on his e(fx)clipse project, with three posts written in the past week. Firstly he talks about ‘Automated Eclipse Project creation and deployment (for JavaFX)‘, secondly he posts about his recommended project structure for (JavaFX) e4 projects, and finally he has a post about how EMF-Edit-Support is coming to JavaFX via e(fx)clipse.
- Pedro Duque Vieira continues work on his excellent JMetro CSS styling for JavaFX UI controls, this week adding support for JavaFX menus.
- Marco Jakob has posted part six of his series of JavaFX 2 tutorials, this time looking into charts.
- José Pereda has a comprehensive blog post for part one of his series of posts on ArduinoFX, a JavaFX GUI for home automation with Raspberry Pi and Arduino.
- Geertjan Wielenga has a post about how Bengt-Erik Fröberg is reworking the UI for JFugue Music NotePad to include elements of JavaFX.
- The Open-Dolphin GitHub repo now has a sample on using dolphin to lazily populate a TableView with 100,000 rows.
- Bruno Borges has started a new project called WebFX, which intends to “investigate the capabilities of using JavaFX (FXML + JS + CSS) to build rich web pages, instead of using HTML. With the new Javascript engine, Nashorn, the performance of a JavaFX page in FXML and the controllers in JS will be much higher than it is today. Idea is to build an FX browser, a security layer, a navigation scheme where one FXML can tell the browser to go to another FXML and a protocol for server-side communication.”
- Filipe Portes has posted to GitHub code for a new project of his called ModuleFX, which “embeds the JavaFX Runtime inside an OSGI bundle, allowing you to create modular JavaFX apps with all the power of OSGI framework, getting the best of Java Rich Client and Modularization worlds together.”
The Hatena Diaryaoe-tk has a post about developing multi-touch application in JavaFX.
That’s us for another week – catch you all next on Christmas Eve (hopefully, assuming we don’t all get wiped out on December 21st 😉 )