浏览文件夹对话框 [英] Browse for folder dialog

查看:61
本文介绍了浏览文件夹对话框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要知道如何在Java中获取文件夹浏览"对话框.我知道SWT.但是我需要摇摆吗?有什么解决办法吗?

I need to know how to get the "browse for folder" dialog in java. I am aware of SWT. But I need to do in swing? Is there any solution to this?

[当我们开始日食时,它将要求选择工作区.我们可以看到当时的浏览文件夹"对话框] 预先感谢.

[As we start on eclipse it will ask for choose workspace. We can see the browse for folder dialog at that time] Thanks in advance.

推荐答案

听起来像您想使用链接.

Sounds like you'll want to use a JFileChooser. Oracle has a bunch of tutorials on basic Swing components and how to use them. Here's their tutorial page for the JFileChooser: link.

这篇关于浏览文件夹对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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