JavaFX – ComboBox [Mobile]

Bookmark and Share

JavaFX 1.3 introduces many new controls. Please use ChoiceBox, MenuButton or SplitMenuButton

Its more almost 6 months since I implemented a sample ComboBox using Control and Skin interface. There is lot of interest for proper implementation of this control. This post is still among my top posts. So thought of enhancing the implementation a bit so as to make it work on real mobile!

For Applet mode, click on above image

For standalone mode

I could also run this sample on Sony-Ericsson XPERIA

Try this new version and let me know feedback

JavaFX – Resolution Independent UI

Creating Resolution Independent UI – This is very tricky and complicated topic. The real solution will be to use layout. But sometimes (mostly?) you learn this the hard way!

I was preparing some demos for SiliconIndia Mobile Application Conference. I downloaded a bunch of samples from – samples. Installed it on Sony Ericsson – X1. Cool! The demos launched successfully.. But…!!!

BrickBreaker sample as seen in mobile with [480 x 800] resolution..

Actual Scaled
<img src="; <img src=";

Many of the nice samples are written for [240 x 320] (resolution of default JavaFX emulator skin). So they appear to be so small on [480 x 800] resolution phone. There is no straight forward way to fix all these samples in such short time (have to show it in conference!!). What next?

Hmm.. Just scale the root node so as to fit the screen. It doesn’t look bad at all on mobile (above screenshot may not look good though)… Well this is not an attempt to provide a solution, but just to help you in case you end up in similar situation! Ofcourse the solution is still to avoid hard-coding of coordinates in the application.. This is just a gentle reminder..

Yes! The demos and presentation was successful.. But yeah.. sometimes you have to incorporate such workaround.. Hope you agree!! You may also be interested in new website – Josh On Design with topics related to UI design..

Diff of BrickBreaker Main.fx

JavaFX for Windows Mobile (EA)

Early access of JavaFX Mobile 1.2 for Windows CE OS is available. I have tried installing JavaFX applications on mobile before. Just thought of trying out the released binaries. The version is tested on HTC Diamond and LG Incite.

I tried to install on Sony Ericsson XPERIA. Given below is the set of steps to install JavaFX on Windows Mobile. I have taken the screenshots from desktop using – MyMobileR

Download and unzip JavaFX Mobile 1.2 for Windows Mobile. Connect mobile to desktop. Copy SUN_JAVAFX.CAB to storage card. Open storage card folder in “File Explorer”. Double click on SUN_JAVAFX entry. It will launch the installer. Click “Yes” and continue with installation.
Choose the location to install. I selected “Storage”. Click on “Install” to continue. Installing JavaFX..
Installation complete.. Open “Programs”. It will have a new icon “JavaFX”. Double click on icon to start JavaFX.
By default it shows a menu with pre-installed samples. Select and double click on “Calculator” sample. Its same as one available at Launching Calculator sample…
Calculator launched
I also installed the animation sample. Just copy the *.jad and *.jar file to storage card. Double click on .jad file to install the application. Select the folder to install. Launch “JavaFX” from “Programs”. Now the menu will have entry for new application. Double click to launch application. It runs fine as shown below (video is taken directly from mobile screen).

Please refer to Terrence Barr’s Blog for screencast and deployment of Mosaic sample on mobile.

var dzone_style = ‘2’;

JavaFX Mobile – Its Real !!

Please also refer to latest blog – JavaFX for Windows Mobile

I have developed many client side applications using AWT/Swing/2D for desktop. I have never developed any application for Mobile. With JavaFX I could develop applications using Common Profile APIs and deploy the application in JavaFX Emulator. JavaFX ensures that the same application runs fine on Mobile. But still I was a bit skeptical about this. Its not because I don’t trust the mobile engineers, I guess its just human psychology! – Seeing Is Believing. Am I really a mobile application developer?

So I installed a JavaFX mobile runtime (internal build) on my phone and installed various JavaFX samples. Voilà!! I have the samples running perfectly fine the same way as it runs on Emulator!! I took some pictures of them so as to share with all of you.

Now I’m convinced JavaFX Mobile is real and I’m mobile developer! If still not convinced, you will have to wait for official release of runtime so that you can install it on your phone and try it for real!

You may have query regarding details of the phone…
That you can easily guess from the list of partners!

digg_skin = ‘compact’;
digg_window = ‘new’;