Re: JFileChooser




<marcodepe@xxxxxxxxxx> wrote in message
news:1146034495.826398.24370@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi,
i've got a problem with JFileChooser. I'd like to have a JFileChooser
in which it will be possible to present files following this format:

supposing to have a directory with these files

aaa.txt
aaa.doc
aaa.exe

bbb.txt
bbb.doc
bbb.exe

i'd like to presente only a list with 2 selectable files:
aaa.*
bbb.*


I tried an experiment with a custom FileView but i obtained this list
aaa.*
aaa.*
aaa.*
bbb.*
bbb.*
bbb.*

and selecting for example the first i obtained aaa.txt in the TextField

Is there a solution ?


I'm not sure I understand what you want to do so I'm not sure what solution
to suggest.

Given the six specific file names that you listed at the beginning, do you
want the JFileChooser to show you only:
aaa.*
bbb.*

In other words, you want only 2 things in the file list and those two things
are literally aaa.* and bbb.*? Do you want someone who chooses aaa.* to have
_all_ of the files whose name starts with aaa be returned to the program or
just some of the files whose name starts with aaa? Can someone who uses the
JFileChooser select both aaa.* _and_ bbb.* or are they limited to only one
selection?

--
Rhino





.



Relevant Pages

  • Re: Can you preselect javax.swing.filechooser.FileFilter.getDescription()?
    ... You have stored the file name extension into a String that you can ... You will now generate a JFileChooser that will allow you to save ... Generate for selecting ... JFileChooser chooser = new JFileChooser; ...
    (comp.lang.java.help)
  • Can you preselect javax.swing.filechooser.FileFilter.getDescription()?
    ... You have stored the file name extension into a String that you can ... You will now generate a JFileChooser that will allow you to save ... Generate for selecting ... JFileChooser chooser = new JFileChooser; ...
    (comp.lang.java.help)
  • working with JList
    ... .There is a problem with selecting multiple files in a JFileChooser. ... have a small display within the JFileChooser. ...
    (comp.lang.java.gui)
  • working with JList
    ... .There is a problem with selecting multiple files in a JFileChooser. ... have a small display within the JFileChooser. ...
    (comp.lang.java.gui)