JFXMobile – first attempt follow up

The previous post contains a detailed log of my adventure in getting a JavaFX application running on Android. It highlights the initial hurdles, the amazement how easy it was once those hurdles were taken, and comes with the conclusion that I need a new hardware.

Well.

Turns out I do not need a new hardware.

TableView

Besides the date picker my application will also need an editable table. So continuing the HelloWorld test, I added one. Tables are never simple, but after you have done JTable, TableView is a breeze. After compilation it started on the Nexus without a hick and was very responsive!

Ok, but a TableView is not a simple component! If Jonathan is able to get that thing working responsive, why isn’t JFXtras’ CalendarPicker responsive? I mean, I admire and respect the magic mr. Kiwi does with the controls in JavaFX, and do not pretend to know half as much about that as he does… But a two second sluggish response?! Boundaries have to be drawn, limits need to be set! 😉

CalendarPicker

So I revisited the source code of the skin of calendar picker, and did some analysis. It was the second component I wrote for JavaFX and has undergone MANY refactorings. Turns out it could use a bit more. Some events were listened to, but did not contribute anything. Some code could be a bit less, ah, British (as they call it).

And after a good 30 minutes of tuning, things still ran on the desktop as they should, but on the Nexus it was a major difference! Instant responses to a click! Wow!

A desktop is very forgiving if code is not optimal, and on Android it does not have to be perfect, but a bit of tuning really pays off!

I do not need a new hardware after all…

This Post Has 2 Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.