How do I add a filter in JFileChooser for files with no extension?

Is it possible to have a filter with that filters out files with no extension in a JFileChooser?
Any help is appreciated.
Shankar

When you override accept(File), get the filename from the File object, and parse out the extension. I don't remember there being an easy way to get the extension besides looking for a dot and parsing. If there's no extension, accept it.

Similar Messages

  • I currently have a D-Link DI-604 broadband router with windows computers.  How can I add wifi to the network for use with ipad?  Can I use AirPort Express?

    I currently have a D-Link DI-604 broadband router with windows computers.  How can I add wifi to the network for use with ipad?  Can I use AirPort Express?

    Yes. You can directly connect an 802.11n AirPort Express Base Station (AXn) using an Ethernet cable. The AXn would then just need to be configured as a bridge to allow the D-Link to continue to provide both NAT & DHCP services for all network clients connected to either router.
    In this configuration, the AXn would broadcast a wireless network for your wireless network clients to connect to.

  • How can i add apps to my ipod touch 2 with ios 4.2.1

    how can i add apps to my ipod touch 2 with ios 4.2.1

    Same way as always. Purchases directly for the App store on the iPod or download on your computer and sync to your iPod. To more easily find compatible apps:
    iOSSearch - search the iTunes store for compatible apps.
    Vintapps 3.1.3 - paid app.
    Apple Club - filter apps by iOS version.

  • How do I add multiple rows in Numbers for iPad?

    how do I add multiple rows in Numbers for iPad?

    Hi James,
    On the iPod I can only insert what is on the clipboard but I can insert however many rows I have there. Is it working differently for you? Benjoon seemed to think that he could not do this in Numbers. He was ruling Numbers out because of it. He doesn't need to do that because of this issue.
    If I was needing to insert multiple blank rows often I might keep a table of blank rows or just some blank rows at the end of the working table that I could copy/paste. This is no different than Numbers on the Mac.
    quinn

  • How can I add a new line item for production order?

    HI all,
    How can I add a new line item for production order through BAPI/FM? Thanks in advance.

    Hi Mil,
      Unfortunetly SAP is not in front of me.
    But if possible go to BAPI transaction , check for any production order's bapi for CHANGE purpose. Where you will be able to add your new line.
    Reward if useful!

  • How can I add a password to my PDF file ?

    I'd like to know How can I add a password to my PDF file ?
    Regards,

    Acrobat Help | Securing PDFs with passwords

  • How do you add a watermark to a protected file?

    How do you add a watermark to a protected file?

    Hi whobrew,
    Without the Document Permissions password, you won't be able to add a watermark to the PDF.
    Please let us know if you have additional questions.
    Best,
    Sara

  • Simple question .... how to add photos to the body of my EMAILS -Found 1000 results for How do I add photos to my emails for Thunderbird

    Simple question - How do I add photos to the body of my emails . But instead of the answer - Found 1000 results for How do I add photos to my emails for Thunderbird. There are answers that don't apply at all to the question in anyway. Why does it have to be so hard to get a simple answer to a simple question?
    Thunderbird is acting much like Microsoft, the every reason I dumping MS Live Mail.

    First of all, much help for Thunderbird refers to menus which may not be visible. It would help you and us if you have your menus and toolbars visible.
    http://chrisramsden.vfast.co.uk/13_Menus_in_Thunderbird.html
    So, open a write window. Enable its menu and toolbar(s).
    Now do you see an "Insert" option?
    If not, you may be set to compose in plain text, which does not support embedded images.
    '''[http://kb.mozillazine.org/Menu_differences_in_Windows,_Linux,_and_Mac Tools|Account Settings]|{select account}|Composition & Addressing''' and ensure "Compose messages in HTML format" is ticked. If it wasn't already ticked, go back to composing a message. Any better now?
    Once you have HTML composition mode going, you can use '''Insert|Image''' or various permutations of copy-and-paste and drag-and-drop into your message body.
    A manual, of sorts: http://en.flossmanuals.net/thunderbird/composing-messages/

  • How do I add a smart mail box for my email account on my iPone?Is that possible?

    How do I add a smart mail box for my email account on my iPone?Is that possible?(I mean mail box that sorting specific emails from my inbox)Thankssss.

    You can't add a smart mailbox, but depending on your iOS version you can add a server stored mailbox with an IMAP or Exchange account for sorting received and sent messages by category.  Not possible with a POP account.

  • How do we add trap-recipients to the acl file?

    How do we add trap-recipients to the acl file?
    Any examples.

    Here's some documentation I am working on for my place of work - hope this helps:
    There are two Sun-provided configuration files of note that must be maintained and provided to the SNMP agent program as command line arguments when it runs. They are:
    X.acl (subagent access control file, where X is your agent name)
    X.reg (subagent registration file, where X is your agent name)
    Note: For more information on either of these files, read the Solstice Enterprise Agents User Guide found on the Sun website, but don't expect too much.
    The reg file specifies the subagent name and OID tree it is responsible for, among other things.
    The acl file contains a list of communities that will be sent traps. This file will need to be periodically updated with the IP addresses of any entity that wants to receive traps from the X subagent. The file looks in part like this:
    acl = {
    communities = public, private
    access = read-write
    managers = dv, localhost
    trap = {                                                             
    trap-community = SNMP-trap
    hosts = dv, localhost
    enterprise="Xenterprise"
    trap-num = 1-5
    Where "dv" and "localhost" are configured in the /etc/hosts file as IP addresses to send traps to and "Xenterprise" is an enterprise that must be registered EXACTLY as is shown in the /etc/snmp/conf/enterprises.oid file. (Note: Some of the enterprises in this file have spaces within their name. This WILL NOT WORK. So if for some reason, an enterprise you were going to use is "MY Enterprise" you must changes this file because your MIB will not compile with an enterprise with spaces in the TRAP-TYPE declaration.
    So, to add a new community, add an argument to the "managers" and "hosts" line in the .acl file and ensure that this reference has its IP address listed in the /etc/hosts file.
    Furthermore, in /etc/snmp/conf/snmpdx.acl a comparable entry needs to be added as well. The snmpdx executable is the master agent that the subagent communicates with. It also has an entry in its .acl file as follows:
    trap = {                                                            
    trap-community = SNMP-trap
    hosts = dv, localhost
    enterprise="Xenterprise"
    trap-num = 1-5

  • How can I write new objects to the existing file with already written objec

    Hi,
    I've got a problem in my app.
    Namely, my app stores data as objects written to the files. Everything is OK, when I write some data (objects of a class defined by me) to the file (by using writeObject method from ObjectOutputStream) and then I'm reading it sequencially by the corresponding readObject method (from ObjectInputStream).
    Problems start when I add new objects to the already existing file (to the end of this file). Then, when I'm trying to read newly written data, I get an exception:
    java.io.StreamCorruptedException
    at java.io.ObjectInputStream.readObject0(Unknown Source)
    at java.io.ObjectInputStream.readObject(Unknown Source)
    Is there any method to avoid corrupting the stream? Maybe it is a silly problem, but I really can't cope with it! How can I write new objects to the existing file with already written objects?
    If anyone of you know something about this issue, please help!
    Jai

    Here is a piece of sample codes. You can save the bytes read from the object by invoking save(byte[] b), and load the last inserted object by invoking load.
    * Created on 2004-12-23
    package com.cpic.msgbus.monitor.util.cachequeue;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.RandomAccessFile;
    * @author elgs This is a very high performance implemention of Cache.
    public class StackCache implements Cache
        protected long             seed    = 0;
        protected RandomAccessFile raf;
        protected int              count;
        protected String           cacheDeviceName;
        protected Adapter          adapter;
        protected long             pointer = 0;
        protected File             f;
        public StackCache(String name) throws IOException
            cacheDeviceName = name;
            f = new File(Const.cacheHome + name);
            raf = new RandomAccessFile(f, "rw");
            if (raf.length() == 0)
                raf.writeLong(0L);
         * Whne the cache file is getting large in size and may there be fragments,
         * we should do a shrink.
        public synchronized void shrink() throws IOException
            int BUF = 8192;
            long pointer = getPointer();
            long size = pointer + 4;
            File temp = new File(Const.cacheHome + getCacheDeviceName() + ".shrink");
            FileInputStream in = new FileInputStream(f);
            FileOutputStream out = new FileOutputStream(temp);
            byte[] buf = new byte[BUF];
            long runs = size / BUF;
            int mode = (int) size % BUF;
            for (long l = 0; l < runs; ++l)
                in.read(buf);
                out.write(buf);
            in.read(buf, 0, mode);
            out.write(buf, 0, mode);
            out.flush();
            out.close();
            in.close();
            raf.close();
            f.delete();
            temp.renameTo(f);
            raf = new RandomAccessFile(f, "rw");
        private synchronized long getPointer() throws IOException
            long l = raf.getFilePointer();
            raf.seek(0);
            long pointer = raf.readLong();
            raf.seek(l);
            return pointer < 8 ? 4 : pointer;
         * (non-Javadoc)
         * @see com.cpic.msgbus.monitor.util.cachequeue.Cache#load()
        public synchronized byte[] load() throws IOException
            pointer = getPointer();
            if (pointer < 8)
                return null;
            raf.seek(pointer);
            int length = raf.readInt();
            pointer = pointer - length - 4;
            raf.seek(0);
            raf.writeLong(pointer);
            byte[] b = new byte[length];
            raf.seek(pointer + 4);
            raf.read(b);
            --count;
            return b;
         * (non-Javadoc)
         * @see com.cpic.msgbus.monitor.util.cachequeue.Cache#save(byte[])
        public synchronized void save(byte[] b) throws IOException
            pointer = getPointer();
            int length = b.length;
            pointer += 4;
            raf.seek(pointer);
            raf.write(b);
            raf.writeInt(length);
            pointer = raf.getFilePointer() - 4;
            raf.seek(0);
            raf.writeLong(pointer);
            ++count;
         * (non-Javadoc)
         * @see com.cpic.msgbus.monitor.util.cachequeue.Cache#getCachedObjectsCount()
        public synchronized int getCachedObjectsCount()
            return count;
         * (non-Javadoc)
         * @see com.cpic.msgbus.monitor.util.cachequeue.Cache#getCacheDeviceName()
        public String getCacheDeviceName()
            return cacheDeviceName;
    }

  • How can i make a picture from a video file with final cut pro x?

    how can i make a picture from a video file with final cut pro x?

    Go to the "share" menu, select "save current frame"

  • I am trying to find out how to assign files with particular extensions to the appropriate software. At the moment when I create a file using Word it is apparently given the extension .docx but Word doesn't recognise its own files. How do I alocate th

    I am trying to find out how to assign files with particular extensions to the appropriate software. At the moment when I create a file using Word it is apparently given the extension .docx but Word doesn't recognise its own files. How do I allocate the extension .docx to Word? There used to be a way of doing it, I think under "Preferences" but I can't seem to find it.

    Still in the same location:
    File > Get Info > Open with (select) > Change All (button)

  • How to open a file with the extension x3f (sigma)

    how to open a file with the extension x3f (sigma)?

    RAW data from the following Sigma cameras is currently supported:
    DP1
    DP1s
    DP2
    SD9
    SD10
    SD14
    If your camera is among these, then simply import the photo as usual. https://helpx.adobe.com/lightroom/help/importing-photos-lightroom-basic-workflow.html

  • I have a problem with the mac can not read video files with the extension IMOD. How can I solve this problem?

    I have a problem with the mac can not read video files with the extension IMOD. How can I solve this problem?

    By doing a Google search. 

Maybe you are looking for

  • Finder keeps crashing (and restarting)

    I recently installed StuffIt 11 and Toast 8 around pretty much the same time. Ever since, I find that Finder keeps crashing whenever I am trying to do something using the right click context menu (i.e. move to trash or open with etc) I had a look at

  • How to post actual in WBS element.

    Hi There, I have one typical situation here. My company dont have Project system in SAP. now they are implementing PS. They wanted to bring all projects and Wbs element in SAP They have budget on XYZ wbs elemnt is about 150,000 USD. and they have spe

  • Help please w/nano plu

    Hello there! I am frustrated!! I see some others are having problems with the nano plus also. I am so ready to toss it aside and purchase another mp3 but not a creative one. Here are my problems. . It does not display on the device all the music that

  • Purge, Resize or change ACR cache in Elements

    " 1. In Adobe Bridge, choose Edit > Camera Raw Preferences (Windows) or Bridge > Camera Raw Preferences (Mac OS), or, with the Camera Raw dialog box open, click the Open Preferences Dialog button . 2. Do any of the following: To change the cache size

  • Implementation pbms and support tickets..

    Hi,   can anybody explain realtime implementation pbms and support issues...can u give me some ten examples...thanks to all