LondonRob
LondonRob

Reputation: 78893

Why is Java's file browser so old-looking?

I'm using a piece of software called Gephi on Linux Mint 17. The software is based on Java.

My Java is as follows:

> java -version
java version "1.7.0_65"
OpenJDK Runtime Environment (IcedTea 2.5.2) (7u65-2.5.2-3~14.04)
OpenJDK 64-Bit Server VM (build 24.65-b04, mixed mode)

When I want to open a new file in this software, I'm presented with a file browser directly from the early 1990s, so search ability, no favourite places list, just my / directory:

OpenJDK File Browser

My question is: is this due to my version of OpenJDK, to a problem with Java in general (perhaps specifically, Java on Linux?), or is this something the developers of the software might be able to do something about?

Upvotes: 4

Views: 235

Answers (2)

Andy Thomas
Andy Thomas

Reputation: 86459

It's not Java, it's Swing.

Java SE includes Swing, a cross-platform UI toolkit. But by design, most of Swing is not implemented by native controls.

The Swing file browser is not a native dialog.

Updates to native dialogs do not affect it. Enhancements require that the work in Swing become a priority to Oracle.

You can make enhancement requests at bugs.java.com. There is this existing request: JDK-6689314 : JFileChooser should support custom "favorite places" instd of closed ShellFolder.

Another alternative is to use a cross-platform UI toolkit for Java that does use native dialogs. The Standard Widget Toolkit (SWT) is one such toolkit. It's file dialog is the native file dialog. (Though, at the time of this writing, its folder chooser, while native, is still rather primitive.)

Upvotes: 7

joey rohan
joey rohan

Reputation: 3566

In addition to the above answer (By Andy), have a look at Look and Feel which can be used to change the appearance of swing components.

This is how a Nimbus Look and Feel looks like (from the above link):

enter image description here

Upvotes: 0

Related Questions