JFileChooser

Discussion in 'Java' started by Chase Preuninger, Apr 13, 2008.

  1. for some reason when I open this dialog the button still says "Open"

    chooser.setDialogType(JFileChooser.SAVE_DIALOG);
    chooser.setMultiSelectionEnabled(false);
    chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
    chooser.setSelectedFile(new File(f.getName()));
     
    Chase Preuninger, Apr 13, 2008
    #1
    1. Advertising

  2. Chase Preuninger

    Guest

    On Apr 13, 10:58 am, Chase Preuninger <>
    wrote:
    > for some reason when I open this dialog the button still says "Open"
    >
    > chooser.setDialogType(JFileChooser.SAVE_DIALOG);
    > chooser.setMultiSelectionEnabled(false);
    > chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
    > chooser.setSelectedFile(new File(f.getName()));


    See examples here:

    http://exampledepot.com/egs/javax.swing.filechooser/pkg.html

    And, BTW, use this site for short, quick and precise examples of any
    kind of Java sniplets:

    http://exampledepot.com/
    I use it for years since it was http://javaalmanac.com

    Alex.
    http://www.myjavaserver.com/~alexfromohio/
     
    , Apr 13, 2008
    #2
    1. Advertising

  3. Chase Preuninger

    Roedy Green Guest

    On Sun, 13 Apr 2008 07:58:04 -0700 (PDT), Chase Preuninger
    <> wrote, quoted or indirectly quoted someone
    who said :

    >for some reason when I open this dialog the button still says "Open"
    >
    >chooser.setDialogType(JFileChooser.SAVE_DIALOG);
    >chooser.setMultiSelectionEnabled(false);
    >chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
    >chooser.setSelectedFile(new File(f.getName()));


    see http://mindprod.com/jgloss/jfilechooser.html
    for sample code.
    --

    Roedy Green Canadian Mind Products
    The Java Glossary
    http://mindprod.com
     
    Roedy Green, Apr 14, 2008
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Roedy Green
    Replies:
    0
    Views:
    743
    Roedy Green
    Jul 9, 2003
  2. alexonjava99
    Replies:
    0
    Views:
    1,768
    alexonjava99
    Jul 26, 2003
  3. Mr. Deckard

    Re: JFileChooser & RMI

    Mr. Deckard, Aug 10, 2003, in forum: Java
    Replies:
    2
    Views:
    1,396
    Stephen Gilbert
    Aug 10, 2003
  4. Kay

    JFileChooser?

    Kay, Aug 18, 2003, in forum: Java
    Replies:
    2
    Views:
    666
  5. Nick =?ISO-8859-15?Q?Wiedenbr=FCck?=

    [JFileChooser] Drive Label Update

    Nick =?ISO-8859-15?Q?Wiedenbr=FCck?=, Sep 19, 2003, in forum: Java
    Replies:
    0
    Views:
    421
    Nick =?ISO-8859-15?Q?Wiedenbr=FCck?=
    Sep 19, 2003
Loading...

Share This Page