Article View: borland.public.jbuilder.java.language
Article #17490Re: Listing Local and Network Drives?
From: John P. McGrath
Date: Wed, 04 Nov 1998 00:00
Date: Wed, 04 Nov 1998 00:00
28 lines
1714 bytes
1714 bytes
Dr. Matt H. Stevens <mhstevens@mmm.com> wrote: > Hi All, I am trying to write a custom FileDialog and I am running into > one problem, (1) How do you get a list (in java) of the available local > and network drives on a WinNT system? (2) A better question is what is > the specific type of component that is used as the "Look In:" choice box > that is placed at the top of the standard FileDialog Box? Is there a way > to get this information without having to write an external EXE in > either Delphi or C++builder to extract this information? Thanks in > Advance, Matt mhstevens@mmm.com The FileDialog class is an AWT component, so it is implemented using a heavyweight peer class (java.awt.peer.FileDialogPeer). I don't think you will find any methods here that will provide the information that you want. The Swing FileChooser is implemented entirely in Java, and it seems to do what you want. However, I looked at source of FileChooser, and it looks like it is pretty much a hack. And the Swing package does not contain the source code that actually determines which filesystems are available. But the code is in Java, so it must be possible. -- Regards, John P. McGrath <mcgrath@enter.net> <jpm@nscs.fast.net>
Technical Details
Message-ID:
<MPG.10a9bffc39ea51889896fa@forums.inprise.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<363F2FC4.781BE17D@mmm.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,98c1f9048012a65e X-Google-Attributes: gidf74b3,public From: mcgrath@enter.net (John P. McGrath) Subject: Re: Listing Local and Network Drives? Date: 1998/11/04 Message-ID: <MPG.10a9bffc39ea51889896fa@forums.inprise.com> X-Deja-AN: 408202273 References: <363F2FC4.781BE17D@mmm.com> Organization: Software Consulting Services Newsgroups: borland.public.jbuilder.java.language