如何制作输出目录选择面板? [英] How to make output directory selection panel?

查看:146
本文介绍了如何制作输出目录选择面板?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好我正在尝试制作一个在我的计算机中显示类似Windows资源管理器的窗格。用户完成操作时
,之后当他想将编辑过的图像保存在磁盘上的特定位置时,他可以轻松地从该窗格中选择目录。
i想设计这样的东西:

Hi I am trying to make one pane that shows something like windows explorer in my computer. when user complete it's operations, and after that when he want to save edited image at specific place on disk then he can easily select directory from that pane. i want to design something like this :

是否可以做类似的事情?
我的图片编辑器看起来像:

is it possible to do something like that ? my picture editor looks like :

在编辑器的右侧我想输出类似输出目录选择窗格的东西。

at right side of editor i want to put something like output directory selection pane.


有人知道怎么做吗?

is anyone know how to do that ?


推荐答案

是这是可能的。它基本上只是 JTree

Yes its possible. It's basically just JTree.

你可能想看看 文件#listRoots File#isDirectory 文件#listFiles

You will probably want to take a look at File#listRoots, File#isDirectory and File#listFiles.

你还想看看如何使用树木

您可能还想查看 FileSystemView#getSystemIcon ,它允许您查看给定文件的适当图标

但是,它可能更简单只使用 JFileChooser ;)

However, it might be simpler to just use a JFileChooser ;)

这篇关于如何制作输出目录选择面板?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆