• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Drag and Drop to Desktop Issue

 
Johann Dobbins
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a table component which contains a file representations, which have associated inputstreams. I want to be able to drag a selection of files from this component to the desktop. But when I use the below code, windows informs me that: "Cannot move file, it is being used by another person or program. Close any programs that maybe be using this file and try again".

 
Paul Clapham
Sheriff
Posts: 21416
33
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, it's that code which is the guilty party. Close the FileOutputStream after you finish writing to it.
 
Johann Dobbins
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
oops ... thank you
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic