JFileChooser 中的文件图标使用操作系统中的文件图标:
jfileChooser.setFileView(new FileView() {
public Icon getIcon(File f) {
return jfileChooser.getFileSystemView().getSystemIcon(f);
}
});
本文介绍如何在Java中使用JFileChooser组件显示操作系统默认的文件图标。通过覆写getIcon方法并调用JFileChooser的getSystemIcon方法实现。
3523

被折叠的 条评论
为什么被折叠?



