In this code, I can select multiple files, but I am sure it is NOT selecting multiple files because "text.append("Opening "+file.getName()+"\n New Line\n");" code doesn't show names of multiple selected files, just a one file. Please help me..
Apart from this, I noticed I can't select files by simply CLICK AND DRAG system. How to enable that? Please help...
Are you better than me? Then please show me my mistakes..
Thanks a LOT for your quick reply. Actually I didn't know about that method because I was just learning about JFileChooser by my self through Oracle tutorials. Here is my new code.
This code works fine but there is a small issue. As you can see, this code accepts an array length of 5, which is fixed. But if someone need to select 30 files at ones, the array length will be insufficient. Is there a way to set the array length according to the number of files that user select? or else should I simply give an big array length like 100 ?
No. You don't decide how big the array is, the JFileChooser returns the array. It decides. You can certainly create your own array, as you did in that code, but that's pointless because the next line of code replaces it with the array returned from the JFileChooser.
OHHH YEAH!! Great, Perfect and excellent!!! This is what I call as learning!!! I did the code, have a look!
Thanks lot for all of you.. Since my primary objective is completed, I am marking this thread as solved, but I have another 2 questions.
I noticed I can't select files by simply CLICK AND DRAG system. How to enable that?
I don't like the way that the open dialog looks. It is just normal as we can see in other software. Got to know this is because of "Jave Look And Feel". Still I haven't learn about this, but if yes, I will definitely learn. Please help.,