java – 如何在“详细信息”视图中启动JFileChooser?
发布时间:2020-12-14 05:40:01 所属栏目:Java 来源:网络整理
导读:我想让我的JFileChooser从详细信息视图开始,而不是它开始的“列表”视图.你如何做? 解决方法 您可以从ActionMap获取Action: JFrame frame = new JFrame();JFileChooser fileChooser = new JFileChooser(".");Action details = fileChooser.getActionMap().
我想让我的JFileChooser从详细信息视图开始,而不是它开始的“列表”视图.你如何做?
解决方法
您可以从ActionMap获取Action:
JFrame frame = new JFrame(); JFileChooser fileChooser = new JFileChooser("."); Action details = fileChooser.getActionMap().get("viewTypeDetails"); details.actionPerformed(null); fileChooser.showOpenDialog(frame); (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |