Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

java

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?

like image 993
LondonRob Avatar asked Mar 19 '23 05:03

LondonRob


1 Answers

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.)

like image 149
Andy Thomas Avatar answered Mar 20 '23 19:03

Andy Thomas