Guest User

Untitled

a guest
Jul 20th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. import java.io.File;
  2. import javax.swing.filechooser.FileFilter;
  3.  
  4. public class RobotRouteFileFilter extends FileFilter
  5. {
  6. /**
  7. * Permit .dat files only.
  8. */
  9. public boolean accept(File objFile)
  10. {
  11. if (objFile.isDirectory())
  12. return true;
  13. return objFile.getName().endsWith(".dat");
  14. }
  15.  
  16. /**
  17. * Get the .dat file description.
  18. */
  19. @Override
  20. public String getDescription()
  21. {
  22. return "*.dat";
  23. }
  24. }
Add Comment
Please, Sign In to add comment