🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.lenguajes.java
Article #28838

Re: Filtros en FileDialog

#28838
From: Oze
Date: Wed, 25 Feb 1998 00:00
46 lines
1806 bytes


Cristian Personat Mart�n <permarcr@eupmt.upc.es> escribi� en art�culo
<34F1D0C6.125A76C5@eupmt.upc.es>...
> Hola a todos:
> 
>     Os lanzo esta pregunta:
> 
>    � Sabeis como se ponen filtros en el cuadro de FileDialog para que
> solo aparezcan unos determinados ficheros, por ejemplo *.txt; *.doc;
> *.wri ?
>                                                          Muchas gracias.
> ------------------------------------------------------------------------
>                     Pod�is vistar mi secci�n de java.
> ------------------------------------------------------------------------
> 
> --
>  Para cualquier ...
>    CRISTIAN PERSONAT MART�N
>   http://www.eupmt.upc.es/~permarcr
>   mailto:permarcr@eupmt.upc.es
> 
> 

	Yo tuve una duda parecida y gracias a la ayuda del grupo la resolv�.

	Te mando un filtro, tu s�lo tendr�s que cambiar el formato:


import java.io.FilenameFilter;
import java.io.File;
public class Filtro implements FilenameFilter
   {
      public boolean accept(File dir, String nombre)
      {
         return
((nombre.endsWith(".simplex"))&&(nombre.startsWith("nivel0")));
      }
   }
	

	En fin, el return del accept, es lo que tienes que poner t�.

	Un saludo
	Oze.
Technical Details
Message-ID: <01bd41d8$98922d60$d36cd696@carmen.lcc.uma.es>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <34F1D0C6.125A76C5@eupmt.upc.es>

Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII
X-Google-Thread: 1116f3,b7c37c104dd21c27
X-Google-Attributes: gid1116f3,public
From: "Oze" <jmlopez@apolo.lcc.uma.es>
Subject: Re: Filtros en FileDialog
Date: 1998/02/25
Message-ID: <01bd41d8$98922d60$d36cd696@carmen.lcc.uma.es>
X-Deja-AN: 328503624
Content-Transfer-Encoding: 8bit
References: <34F1D0C6.125A76C5@eupmt.upc.es>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Organization: Centro Informatico Cientifico de Andalucia
Newsgroups: es.comp.lenguajes.java