简体   繁体   English

在Java Swing中显示Windows资源管理器类型的文件结构的最简单方法是什么?

[英]What's the easiest way to show a Windows Explorer-type file structure in Java Swing?

I thought I'd ask in case someone else has run into this before. 我以为我会问别人是否曾经遇到过这种情况。

How would you go about showing the user's file directory structure in a Java applet, something like Windows Explorer? 您将如何在Java小程序(例如Windows资源管理器)中显示用户的文件目录结构?

Would I have to create a JTree and manipulate that, or is there an easier way? 我必须创建一个JTree并对其进行操作,还是有一种更简单的方法?

The easiest way is to use a FileChooser . 最简单的方法是使用FileChooser Your applet needs to be a signed applet so it could access the client file system, here a small article regarding this 你的小程序需要一个签名的小,因此它可以访问客户端文件系统,在这里一个小文章对此

I think JTree would be the easiest way. 我认为JTree是最简单的方法。

but if you just want it to view files before you load them then use a file chooser . 但是如果您只希望它在加载文件之前先查看文件,则可以使用文件选择器

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Java Swing客户端使用Web服务的最简单方法是什么? - What's the easiest way for a Java Swing client to consumer a webservice? 带有Java Swing的Netbeans GUI Builder; 组织小部件最简单的方法是什么? - Netbeans GUI Builder with Java Swing; What's the easiest way to organize Widgets? 在Eclipse IDE中设计Java Swing GUI的最简单方法是什么? - What is the easiest way to design Java Swing GUIs in Eclipse IDE? 使用带有 Swing 的鼠标绘制(单色)数组的最简单方法是什么? - What's the easiest way to draw a (monochrome) array using a mouse with Swing? 持久化 Java 对象的最简单方法是什么? - What's the easiest way to persist java objects? 在 Java 中实现计时器的最简单方法是什么? - What's the easiest way to implement a timer in Java? 查看Java程序的本机汇编代码 - Windows中最简单的方法是什么? - Seeing a Java program's native assembly code — What's the easiest way in Windows? 在 Java 中解析 INI 文件的最简单方法是什么? - What is the easiest way to parse an INI file in Java? 在 Java 中更新 JSON 文件并保留确切格式的最简单方法是什么 - What's the easiest way to update a JSON file in Java preserving the exact format 发出HTTP请求以Java异步上传文件的最简单方法是什么? - what's the easiest way to make an HTTP request that uploads a file asynchronously in java?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM