Here you can find the source of getKCTapFileFilter()
public static FileFilter getKCTapFileFilter()
//package com.java2s; //License from project: Open Source License import java.util.HashMap; import java.util.Map; import javax.swing.filechooser.FileFilter; import javax.swing.filechooser.FileNameExtensionFilter; public class Main { private static Map<String, FileFilter> fmt2FileFilter = null; public static FileFilter getKCTapFileFilter() { return getFileFilter("KC-TAP-Dateien (*.tap)", "tap"); }/*from w ww. java2 s . co m*/ private static FileFilter getFileFilter(String text, String... formats) { FileFilter rv = null; if ((formats != null) && (text != null)) { if (formats.length > 0) { if (fmt2FileFilter == null) { fmt2FileFilter = new HashMap<>(); } rv = fmt2FileFilter.get(text); if (rv == null) { rv = new FileNameExtensionFilter(text, formats); fmt2FileFilter.put(text, rv); } } } return rv; } }