JFileChooser不支持我的语言,我会用UIManager.put()来翻译文件http://www.rgagnon.com/javadetails/JavaUIDefaults.txt中定义的字符串,但是我不会找到弹出字符串(右键单击“查看”、“刷新”和“新文件夹”选项)。
有人知道我在哪里能找到他们翻译吗?
--更新
FileDialog创建了一个本机对话框,它解决了翻译问题,但导致了another question。
--更新
目前最好的解决方案是:使用系统默认LAF,因此JFileChooser是系统的本机对话框,不需要翻译。不好我不能用Nimbus..。
发布于 2010-03-18 00:25:46
似乎是sun.swing.FilePane,它有字符串,然后由javax.swing.plaf.basic.BasicFileChooserUI使用。
发布于 2018-06-14 16:08:06
这些是UIManager上下文菜单的JFileChooser字符串。这个例子是用英语设置的。
UIManager.put("FileChooser.detailsViewActionLabelText", "Details");
UIManager.put("FileChooser.listViewActionLabelText", "List");
UIManager.put("FileChooser.viewMenuLabelText", "View");
UIManager.put("FileChooser.refreshActionLabelText", "Refresh"));
UIManager.put("FileChooser.newFolderActionLabelText", "New Folder");https://stackoverflow.com/questions/2466660
复制相似问题