Cool JavaFX 2.0, But What Happened To JFileChooser?

JFileChooser With Missing Icon (Netbeans)
JFileChooser With Missing Icon (Netbeans)

In the midst of all the good news about JavaFX 2.0 and the reinvested interest in the Java Swing Platform by Oracle at JavaOne, I have to ask myself: what happened to JFileChooser? In all the articles I have read in the past year or so about all the cool and upcoming features in the Java 7 and the new component(s) being introduced the Swing library, I have heard very little about JFileChooser or any improvements planned for the platform.

There have been a lot of complaints in the past about poor performance and a lack of some basic functionality for that component. There were even some mentions of the component being replaced with a Native Implementation sometime back, but there has not been any concrete word on that. Personally, my current pet peaves with the component include:

  • Way too minimal right-click PopupMenu – only New Folder, Rename, View and Refresh are implemented. This minimal popup is also way to difficult to extend by the entry level user. Also, drag and drop file handling is implemented, so why is it so difficult to include Open/Select, Cut, Copy and Paste as basic options in the default popup menu?
  • Poor performance for listing directories and their contents when zip archives are included
  • Lack of decent Directory View (possibly as a tree)
  • Ability to use “\\<pc-name>” option on a Windows based system to navigate to a network location

Other more advanced users have other problems with the component but these are the few I feel are general problems and could be fixed or improved.

The current “Open Project” and “Open File” implementations in the Netbeans IDE seem to have some very useful implementations of the JFileChooser and some have even advocated that those components be ported back into the main JDK source if possible, but that is yet to be seen or determined.

All in all, I think the JFileChooser component needs some attention, because it certainly is starved for some.

It Takes 2: From Java 2 to JavaFX 2.0

From Java 2 to JavaFX 2
From Java 2 to JavaFX 2

After hearing about Oracle’s new Road Map for the JavaFX 2.0 release expected to be made available next year, I found it sort of funny to realize the similarity between what it took for Java to become successful and what it probably is going to take for JavaFX to be become successful.

Up until version 1.6 of the currently successful Java Platform, it carried the brand “Java 2 Platform v1.x” and this was basically the platform I met when I begun my programming career. According to Wikipedia:

J2SE 1.2 (December 8, 1998) — Codename Playground. This and subsequent releases through J2SE 5.0 were rebranded Java 2 and the version name “J2SE” (Java 2 Platform, Standard Edition) replaced JDK to distinguish the base platform from J2EE (Java 2 Platform, Enterprise Edition) and J2ME (Java 2 Platform, Micro Edition). Major additions included reflection, a Collections framework, Java IDL (an IDL implementation for CORBA interoperability), and the integration of the Swing graphical API into the core classes. a Java Plug-in was released, and Sun’s JVM was equipped with a JIT compiler for the first time.

So what is similar in between Java and JavaFX at this point? That will be their version number. It seems Java and JavaFX will potentially owe their success to their “second” major version. From the road map presented by Oracle and the expected changes with respect to API, language and integration changes, I expect if finished in time and coupled with a possible Java 7 release around the same time, JavaFX 2.0 is set to become the next best thing in the RIA and Java UI development arena.

I so far have not used JavaFX for anything more than a demo app and an attempt at making a Flash type web banner animation. But with the proposed changes, I feel I can immediately drop JavaFX 2.0 into my current application to pimp up the UI and deliver a whole new user experience for the next version of the application. So I only hope Oracle lives up to the current road map and plans and deliver a kick ass platform with all the proposed widgets and finally what seems like JWebpane.

Oracle make us proud.