Adding File Filters to the JFileChooser Dialog

Tutorials Shared by the Internet Community

Advertisements


Synopsis

When using the JFileChooser to dialog to save files, you will usually want to give the user a list of types that they can save the file as.

Statistics

  • Total Hits - 16241

  • Total Votes - 103 votes

  • Vote Up - 45 votes

  • Vote Down - 58 votes

  • Domain - www.codebeach.com

  • Category - JAVA/Swing

  • Submitted By - Devesh Khanna

  • Submitted on - 2008-03-12 11:08:40

Description

When using the JFileChooser dialog to open files, you will usually want to give the user a list of filters to make finding a file of a specific type easier. When using the JFileChooser to dialog to save files, you will usually want to give the user a list of types that they can save the file as. This tutorial will show how to do this. This tutorial will show how to create a file filter to only show text files and a file filter that shows only files that are less than a month old. ...


Site  |   Broken  |   Tweet  |   Facebook  |     |   Save  |   Liked  |   Down

Advertisements