• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java swing

 
vel mayil
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to display a directories in text fields when a button clicked
 
Maneesh Godbole
Saloon Keeper
Posts: 11096
13
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Rob Spoor
Sheriff
Pie
Posts: 20611
63
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Somehow I think that JFileChooser is going to be the answer to this one.
 
Maneesh Godbole
Saloon Keeper
Posts: 11096
13
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic