Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.File;
- import javax.swing.filechooser.FileFilter;
- public class RobotRouteFileFilter extends FileFilter
- {
- /**
- * Permit .dat files only.
- */
- public boolean accept(File objFile)
- {
- if (objFile.isDirectory())
- return true;
- return objFile.getName().endsWith(".dat");
- }
- /**
- * Get the .dat file description.
- */
- @Override
- public String getDescription()
- {
- return "*.dat";
- }
- }
Add Comment
Please, Sign In to add comment