[JFileChooser] Drive Label Update

  • Thread starter Nick =?ISO-8859-15?Q?Wiedenbr=FCck?=
  • Start date
N

Nick =?ISO-8859-15?Q?Wiedenbr=FCck?=

Hi,

I wrote an application that uses a JFileChooser. When I open the chooser and
walk through to my cd-rom drive, the label of the cd is shown. But when I
close it, change the cd and open the chooser again, the label of the
previous cd is shown, not the label of the current cd.

How do I get the chooser to update the label?

Thanks,
Nick
 
S

Steve W. Jackson

Nick Wiedenbrück said:
:Hi,
:
:I wrote an application that uses a JFileChooser. When I open the chooser and
:walk through to my cd-rom drive, the label of the cd is shown. But when I
:close it, change the cd and open the chooser again, the label of the
:previous cd is shown, not the label of the current cd.
:
:How do I get the chooser to update the label?
:
:Thanks,
:Nick

I suspect this is the same problem I experienced where new files and
directories also didn't show up next time I opened the chooser. If so,
you should be able to correct it by calling the chooser's
rescanCurrentDirectory() method immediately before showing it.

= Steve =
 
N

Nick =?ISO-8859-15?Q?Wiedenbr=FCck?=

Steve said:
I suspect this is the same problem I experienced where new files and
directories also didn't show up next time I opened the chooser. If so,
you should be able to correct it by calling the chooser's
rescanCurrentDirectory() method immediately before showing it.

= Steve =


Hi,
thank you, but that is not the problem.

Nick
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top