Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how 2 display files of local drives in JTable  RSS feed

 
Vishal Fichadiya
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey frends i m making project on File transfer client Server .In my client GUI i hav taken JTable and a combo box.As v click over cobo box it will displzy list of drives.and as v select tht drive it will show list of files under it in JTable bt i dunt know how 2 dislpay it.How can i display local drive files in JTable.
 
Rob Spoor
Sheriff
Posts: 21047
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you please check your spelling? Also Use Real Workds. It is quite hard to read your post.
For example:
As v click over cobo box

What does this mean? Are you talking about V, the character played by Hugo Weaving in "V for Vendetta"? Or what?

If you are using java.io.File, that has a method called listFiles (and some similar methods) with which you can list all files. You can then add those to a DefaultTableModel.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!