How to make output directory selection panel?

前端 未结 4 807
我寻月下人不归
我寻月下人不归 2021-01-22 15:36

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

4条回答
  •  孤独总比滥情好
    2021-01-22 16:27

    Yes its possible. It's basically just JTree.

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

    You'll also want to take a look at How to use trees.

    You'll probably also want to take a look at FileSystemView#getSystemIcon which will allow you to look an appropriate icon for the given File

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

提交回复
热议问题