Article View: borland.public.jbuilder.java.swing
Article #558Re: How to read file names?
From: Alexey N. Solofnenko
Date: Tue, 05 Jul 2005 00:44
Date: Tue, 05 Jul 2005 00:44
23 lines
1401 bytes
1401 bytes
Something like:
File[] files=new File(dir).listFiles();
for (int i=0, l=files.length; i<l; ++i) {
tableModel.add(files[i].getName()); // or something like that
}
- Alexey.
Anton wrote:
> Hi.
>
> I would like to know which is the process to read from a directory I pass to
> my function, all the files in that directory and put them in
> a table, one row per file with its name.
>
> Thanks
>
>
--
Alexey N. Solofnenko
home: http://trelony.cjb.net/
Technical Details
Message-ID:
<42c9d801$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!news-out.nntp.be!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<42c9be95$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 111d45,3de7873616187efb X-Google-Attributes: gid111d45,public X-Google-Language: ENGLISH,ASCII-7-bit Date: Mon, 04 Jul 2005 17:44:51 -0700 From: "Alexey N. Solofnenko" <nospam@nospam.comp> User-Agent: Mozilla Thunderbird 1.0+ (X11/20050703) MIME-Version: 1.0 Newsgroups: borland.public.jbuilder.java.swing Subject: Re: How to read file names? References: <42c9be95$1@newsgroups.borland.com> In-Reply-To: <42c9be95$1@newsgroups.borland.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 67.188.247.45 Message-ID: <42c9d801$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1120524289 67.188.247.45 (4 Jul 2005 17:44:49 -0700) Lines: 23 Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!news-out.nntp.be!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail