pie*_*mes 5 java windows jfilechooser look-and-feel
显然,Windows (10) 上有(至少?)两个不同的本机文件选择器。有一个,它被JFileChooser和其他程序使用:
我比第一个更喜欢它,因为:
我如何在 Java 中获取它?
FileChooser fileChooser = new FileChooser();
fileChoose.showOpenDialog(null);
Run Code Online (Sandbox Code Playgroud)
PlatformImpl.startup(() -> {
FileChooserd = new FileChooser();
d.showOpenDialog(null);
});
new JFXPanel();
Platform.runLater(() -> {
FileChooser d = new FileChooser();
d.showOpenDialog(null);
});
Run Code Online (Sandbox Code Playgroud)
请注意,混合 JavaFX 和 Swing 时,模态等其他功能将不起作用。此外,您必须构建一些代码,等待 Runnable 完成才能获取结果。
native file dialogs提供了本地文件对话框,LWJGL 3为这个库提供了 Java 绑定。
| 归档时间: |
|
| 查看次数: |
3997 次 |
| 最近记录: |