This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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

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: 10744

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: 20077

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: 10744

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.
I agree. Here's the link:
subject: java swing
It's not a secret anymore!