Here you can find the source of getFileFilter()
public static FileFilter getFileFilter()
//package com.java2s; /******************************************************************************* * Copyright (c) 2016 Pablo Pavon-Marino. * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Lesser Public License v2.1 * which accompanies this distribution, and is available at * http://www.gnu.org/licenses/lgpl.html * * Contributors://ww w .ja v a 2 s .c o m * Pablo Pavon-Marino - Jose-Luis Izquierdo-Zaragoza, up to version 0.3.1 * Pablo Pavon-Marino - from version 0.4.0 onwards ******************************************************************************/ import javax.swing.filechooser.FileFilter; import javax.swing.filechooser.FileNameExtensionFilter; public class Main { private final static FileFilter fileFilter = new FileNameExtensionFilter("Java files (*.class, *.jar)", "class", "jar"); /** * Returns the file filter for this class loader. * * @return File filter (*.class, *.jar) */ public static FileFilter getFileFilter() { return fileFilter; } }