473,399 Members | 4,177 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Filtering filename extensions in JFileChooser

539 512MB
Im now trying to design a class that extends FileFilter that will be use for filtering filename extensions of choice....

I know this is a stupid work for you experts, but i just want test myself if i can now design my own class... Instead of using FileNameExtensionFilter in jdk 1.6,
I assume that i am using j2se 1.5.0 u15...

The purpose is, I like to set those filename extension filtering patterns not the same as FileNameExtensionFilter.. I mean, passing values to a parameter in my own way... For current Project's simplification and optimization...

As of this moment, im attempting to override the accept(File file) and the getDescription() method...

since i hate to miss a thing, Could you guys suggest other classes that can also be use instead of using FileNameExtensionFilter? or could you advice me as im walking down the strange road?!!

waiting for your replies...
sukatoa
Mar 25 '08 #1
4 2074
JosAH
11,448 Expert 8TB
What's that 'T' thing you're talking about all the time? Did you hit something generic
or what?

kind regards,

Jos
Mar 25 '08 #2
sukatoa
539 512MB
What's that 'T' thing you're talking about all the time? Did you hit something generic
or what?

kind regards,

Jos
No, i used T, because it is long for me to type... lazy sometimes ;-)

Sorry for having you doubt with it...

sukatoa.
Mar 25 '08 #3
JosAH
11,448 Expert 8TB
Ok, what doesn't the FileNameExtensionFilter do that you want it to do and adds
functionality? If you just want to pass your parameters around in a different way,
simply extend that class and transmogrify the parameters in the way that class
wants them and call the super constructor. No need to override anything.

kind regards,

Jos
Mar 25 '08 #4
sukatoa
539 512MB
Ok, what doesn't the FileNameExtensionFilter do that you want it to do and adds
functionality? If you just want to pass your parameters around in a different way,
simply extend that class and transmogrify the parameters in the way that class
wants them and call the super constructor. No need to override anything.

kind regards,

Jos
Roger.....

Thanks, im on my way....
Mar 25 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Martin Lucas-Smith | last post by:
Is there some way of using ereg to detect when certain filename extensions are supplied and to return false if so, WITHOUT using the ! operator before ereg () ? I have an API that allows as an...
1
by: hokiegal99 | last post by:
I've written a small script (with much help from this list) that searches through a directory for files without a PC filename extension like .doc .xls and then adds them. The reason for writing the...
27
by: gmtonyhoyt | last post by:
I need assistance coming up with a clean way to handle filename extensions with my application. While I can come up with several ways of doing so on my own, I felt perhaps it would be worth...
3
by: dick | last post by:
Hello, I want to encrypt a file with its filename. I can encrypt the file itself using the frame libraries. How can I now best hide the filename and extension? Within the file, ... ? I...
10
by: Steve | last post by:
I am trying to create a downloader which will bypass the saveas box in the WebBrowser control. I have the file downloading, but I don't know what the filename is that is being passed through the...
3
by: Koji | last post by:
Basically, I have a GUI class where you have to use the JFileChooser class to select a jpg, bmp, or gif file. Then, that file is displayed on a jLabel as an Icon. The next step is taking that file...
3
by: =?Utf-8?B?ZGVlcGFr?= | last post by:
Hi I m facing a strange issue with filename I am attaching an attachment (may be a notepad file, video file or whatever) through a dummy customer page (customer.html) using a text box on...
5
by: Pelle | last post by:
Hello programmers, I have a toolbox that's often working with a FILE * to access files and the lot. Recently, need has arisen to look at the filename of a file when I only have a FILE *. I...
2
by: dragonridingsorceress | last post by:
I am trying to learn how to use the JFileChooser. I'm working in BlueJ. I keep getting a NullPointerException. Full text of the error message is at the bottom of the post. My code is based on some...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.