Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: JFileChooser

  1. #1
    Junior Member
    Join Date
    Jun 2009
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question JFileChooser

    Hey guys! Good day to everyone

    I just had a quick doubt/problem with something i want to achieve, but i cant manage to do it yet. Its about the JFileChooser Swing component. It works wonders, but i want the JFileChooser to only display .TIF files (i just want to learn how to display a type of file actually) and no other than .TIF Files. Can anyone teach me how to this please?


    Thank you all, have a great day!


  2. #2
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,320
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: JFileChooser

    You need to create a custom FileFilter and make a call to setFileFilter from your JFileChooser instance. Might be easier to use a FileNameExtensionFilter class instantiated the specified file extensions. The following link provides instructions on how to accomplish this (scroll down a bit - there is a also a
    How to Use File Choosers (The Java™ Tutorials > Creating a GUI With JFC/Swing > Using Swing Components)

  3. #3
    Junior Member
    Join Date
    Feb 2010
    Location
    Ireland
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Mobile Phone Recycling Services to Recycle Your Mobilefor Cash

    If you use a mobile phone you will probably find yourself needing to
    upgrade or replace it at some point. Millions of people get a new
    phone every 12 to 18 months replacing the old one to be discarded
    somewhere and forgotten about. Old mobile phones can cause adverse
    effects on the Environment if not recycled properly. You can get cash
    if you Recycle Mobile Phones
    by using one of the best
    Mobile Phone Recycling sites online. Just compare the prices and right
    one for you then send in your mobile to await payment. And with many
    incentives and payment options available, now couldn't be a better
    time. See how much money for your mobile you can get by using the
    special Comparison Tool and help the Environment by recycling mobile
    phones for cash at the same time.

    Visit Mobile Phone Recycling - Sell and Recycle Your Mobile Phone for Cash to
    sell and recycle your mobile phone for cash today.

Similar Threads

  1. Replies: 2
    Last Post: March 6th, 2009, 03:00 PM