Alternative to JFileChooser

前端 未结 5 739
清歌不尽
清歌不尽 2020-12-05 03:29

I\'ve a request to make some changes to a little applet that currently use a JFileChooser.
One of the main complaints is that the file chooser is a pain in the ass to us

5条回答
  •  有刺的猬
    2020-12-05 03:55

    I wrote a wrapper around JavaFX' file chooser if available. If included in your application, you can replace

    JFileChooser fileChooser = new JFileChooser();
    

    with

    JFileChooser fileChooser = new NativeJFileChooser();
    

    It will then use the native (and modern) file chooser of the underlying platform. Not everything works 100% the same, so make sure to test it afterwards, but most things should go smoothly.

提交回复
热议问题