How can i filter the file names in SaveDialog box?

Hi all,
I have created a save dialog box. now i want to filter out the file listing inside the save dialog window. ie, i want to know how can i make entries in the "save as type" field so that it should be allowable for a user to select only html and pdf files.
It will be very helpful if there is a code sample of the same.
Thanx in advance,
Abhi...

If you used the JFileChooser to create your dialog box, then the API documentation has an example of exactly that. (Okay, it uses different file extensions.)
If you wrote your own file save dialog box from scratch, then mimic what JFileChooser does.

Similar Messages

  • How can I edit the file name of the home page?

    How can I edit the file name of the home page?
    Gr Ammani

    I have a similar issue with regards to the filename...
    When I navigate to my website, it doesnt work unless I actually type the filename at the end of it. Example: type in "www.whitelion.com" (this is my real domain name) and it doesnt work. When I type in "www.whitelion.com/index.html" then it works.
    This is obviously inconvenient because my clients will never know to add the filename to the end of the site.
    Is there any setting or way to get the page to appear by just typing the original domain name without adding the extension?
    Thanks,
    Emelia

  • When bates numbering a .pdf in XI, how can I change the file name to include the bates number AND its name?  I know under file output, there is an option for either/or.  I want both.  Thank you.

    when bates numbering a .pdf in XI, how can I change the file name to include the bates number and the file name?  I know under "file output: it's either/or.  I need both.  Thanks!

    Long ago I wrote a little demo using the touch command. Check out the following thread:
    http://forums.ni.com/ni/board/message?board.id=170&message.id=25128#M25128
    LabVIEW Champion . Do more with less code and in less time .

  • How can we change the file name character limit on PSE 7?

    When I save for web I need more than 26 characters in the file name. Can you please tell me how to turn this Mac compatibility option off? Thanks.

    Save the file with a short name and rename afterward.
    Juergen

  • How can you keep the file name when using "Download Linked File As..."?

    I'm a longtime PC user finally making the transition to Mac.  Some of the tasks that seemed so simple in Windows have really stumped me!  One of the tasks I do frequently is download files into specific folders.  After much looking, I finally found the "Download Linked File As..." option if I right-click on the download link.  The problem is, when I choose this option, I lose the file name.  I get a window in which I can choose the desired folder, but the filename is always "0".  If I want to keep the filename (and I usually do), I have to type it in manually.  Is there anyway around this?

    You can post a screen shot by clicking on the liitle Camera icon above your reply.  :)
    Just checked on 10.7.4+, still the same, something is borked about your install, to see if we need to re-install...
    To find out if it's system wide or user specific, try this...
    Open System Preferences>Accounts, unlock the lock, click on the little plus icon, make a new admin account, log out & into the new account.
    Does it work in the new account?

  • How can I see the file name of photographs in Lightroom mobile?

    I have photographs of product wich have there reference number as the file name. When synchronizing to my iphone/ipad I don't see the file name of the photographs any more. Is there a way to show them on my mobile devices?

    Two fingers cycles through the histogram + exif info views. One finger toggles between filling the screen or revealing the filename and adjustment controls.

  • How can I insert the file name automatically on all pages?

    I would like that on all pages of my keynote presentations the file name is inserted automatically in a footer as eg in EXCEL and Word.

    Oh yeah! Very similar to that one is Print Window. I use it all the time.
    http://www.printwindowapp.com
    It costs $20 if you want all the extra features the free version doesn't have. But I've always used the free version. Nothing in the paid version I need.

  • How can I set the file name and folder for output to PDF from another application?

    I am developing an application in Microsoft Access where the printed reports are to be saved in PDF format for archive purposes. I can send the output to Adobe X, but the default file name is the Access report name and the folder selected is the one last used.
    What I need to do is to create the file with a specific name (which changes for each run) and to a specific folder (which also changes for each run).
    The language I'm using is Visual Basic for Applications which is located in an Access form that controls the report production.
    Any suggestions, please?

    Got it - many thanks.

  • How can I change the file name of an mp3 file to it's ID3 name?

    I prefer to alter the ID3 names of my music files to include: ARTIST - Track number - Tune Name. I do this in iTunes, by individually selecting each file, and Apple+I, then change the INFO/NAME tag.
    But the same file has a file name and an ID3 name then.
    Is there any script or APP that will allow me to BATCH convert all music file names to the ID3 name?

    > Do you have iTunes prefs > Advanced - Copy files to iTunes
    > media folder when adding to library checked?
    > (With above checked, when you add to iTunes, it makes a copy
    > of teh file in the iTunes folder and iTunes does not do anything
    >further with the original)
    Yes, how do you think they get there if I double click them in finder and list themselves and start playing in iTunes?
    > You are looking at the file in iTunes not the original file
    > (which is not in iTunes) correct?
    I have talked about both if you will read the thread.
    > In iTunes, right click Show in Finder
    Read the thread carefully, you are missing something.
    > Uncheck Keep iTunes media folder organized,
    > then click OK. Then go back and recheck it.
    Has no effect whatsoever.

  • How can I show the file name of the photo?

    Shouldn't this meda data show load with the photo. When i'm sharing similar photos with people, I would like them to be able to reference a file name.

    Display of filenames is not a current revel feature. Some users have asked for metadata to be displayed and this is on the wishlist for consideration.

  • How can I adjust the file names when using the "export layers to files" Script in photoshop?

    Currently the standard set up adds "_0000s_0001_" in front of the layer names that I need the new files to use. I'm processing hundreds of images so I'd like to avoid selecting and deleting the extra characters one by one. Any way to automate this or set it correctly before exporting?

    http://forums.adobe.com/thread/688851?tstart=0

  • How can I inventory the file name, date, size, type for all my CDs into a readable file on my iMac running Maverick?

    I have many old CDs with files.  In order to organize and search them, I would like to make a searchable file listing all the documents on the CDs.  I once did this in DOS (it was a "list files" command).  Is there anyway to do it in OS X-- Maverick?  I thought Terminal would work, but what I've tried doesn't work.  Any ideas would be appreciated.  I am happy to purchase software that would do the work.

    Oh yeah! Very similar to that one is Print Window. I use it all the time.
    http://www.printwindowapp.com
    It costs $20 if you want all the extra features the free version doesn't have. But I've always used the free version. Nothing in the paid version I need.

  • Can I include the file names of images in the image itself?

    *How can I get the file names of images on each image (without entering them by hand)?*
    (I am bring 250 images into a Keynote document, with each image on its own slide. I want to have the file names of the images shown on each slide or image. This doesn't need to look nice.)
    (If I can't do this in Aperture, I also have Photoshop Elements. Is there a way to do that in Elements?)

    You can't do this directly via Ap3. There are plug in's i believe that make it possible. Maybe someone knows more? Allan

  • C Programming: How can we get the filesystem name for a given file-path?

    C Programming: How can we get the filesystem name for a given file-path?
    Say I have a filepath=/mnt1/file1
    Using some OS API like stat, can I get the Filesystem /mnt ?
    Thanks in advance,
    -V

    Enter the command up to the point of entering the file path and add a space, then drag the file into the terminal window. It will fill out the path.
    If you need to go further into the contents of the Application package, you can continue with /Contents...
    Another way is to start typing and then hit Tab to auto-complete. It will stop where it can't determine the next letter.
    So, type /App tab and it will fill in /Applications. Type a / and start with the name of the app, then tab and it should complete. Continue till you have the correct path.
    Spaces will be replaced with \<space>, so, App Store would end up as /Applications/App\ Store.app

  • How can I assign image file name from Main() class

    I am trying to create library class which will be accessed and used by different applications (with different image files to be assigned). So, what image file to call should be determined by and in the Main class.
    Here is the Main class
    import org.me.lib.MyJNIWindowClass;
    public class Main {
    public Main() {
    public static void main(String[] args) {
    MyJNIWindowClass mw = new MyJNIWindowClass();
    mw.s = "clock.gif";
    And here is the library class
    package org.me.lib;
    public class MyJNIWindowClass {
    public String s;
    ImageIcon image = new ImageIcon("C:/Documents and Settings/Administrator/Desktop/" + s);
    public MyJNIWindowClass() {
    JLabel jl = new JLabel(image);
    JFrame jf = new JFrame();
    jf.add(jl);
    jf.setVisible(true);
    jf.pack();
    I do understand that when I am making reference from main() method to MyJNIWindowClass() s first initialized to null and that is why clock could not be seen but how can I assign image file name from Main() class for library class without creating reference to Main() from MyJNIWindowClass()? As I said, I want this library class being accessed from different applications (means different Main() classes).
    Thank you.

    Your problem is one of timing. Consider this simple example.
    public class Example {
        public String s;
        private String message = "Hello, " + s;
        public String toString() {
            return message;
        public static void main(String[] args) {
            Example ex = new Example();
            ex.s = "world";
            System.out.println(ex.toString());
    }When this code is executed, the following happens in order:
    1. new Example() is executed, causing an object to constructed. In particular:
    2. field s is given value null (since no value is explicitly assigned.
    3. field message is given value "Hello, null"
    4. Back in method main, field s is now given value "world", but that
    doesn't change message.
    5. Finally, "Hello, null" is output.
    The following fixes the above example:
    public class Example {
        private String message;
        public Example(String name) {
            message = "Hello, " + name;
        public String toString() {
            return message;
        public static void main(String[] args) {
            Example ex = new Example("world");
            System.out.println(ex.toString());
    }

Maybe you are looking for