File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes java swing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "java swing" Watch "java swing" New topic

java swing

vel mayil

Joined: Feb 02, 2010
Posts: 1
how to display a directories in text fields when a button clicked
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10768

Welcome to the Ranch.

Usually one uses a JTree to display any directory structure or more specifically a parent/child hierarchy. So the short answer would be, you cannot.
However if you can provide us some more details on what you are trying to achieve, we can help point you in the right direction.

Before posting again, also please read

[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Rob Spoor

Joined: Oct 27, 2005
Posts: 20192

Somehow I think that JFileChooser is going to be the answer to this one.

How To Ask Questions How To Answer Questions
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10768

Yup, even I thought so. But the OP said "display" a directory, which I somehow felt would be displaying the directory structure
Anyway, let us wait for the OP to revert back with more details.
It is sorta covered in the JavaRanch Style Guide.
subject: java swing
It's not a secret anymore!