Here you can find the source of getWavFileFilter()
public static FileFilter getWavFileFilter()
//package com.java2s; //License from project: Open Source License import javax.swing.filechooser.FileFilter; import java.io.File; public class Main { public static FileFilter getWavFileFilter() { return new FileFilter() { @Override/* w w w. jav a 2 s. co m*/ public boolean accept(File f) { return f.isDirectory() || f.getName().endsWith(".wav"); } @Override public String getDescription() { return "WAV sound files"; } }; } }