aspose file tools*
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
Author

java swing

vel mayil
Greenhorn

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: 10451
    
    8

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 http://faq.javaranch.com/java/HowToAskQuestionsOnJavaRanch


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

Joined: Oct 27, 2005
Posts: 19718
    
  20

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


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10451
    
    8

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