Results 1 to 3 of 3

Thread: jFilechooser

  1. #1
    noviceJava is offline Member
    Join Date
    Apr 2012
    Rep Power

    Default jFilechooser

    I'm trying to figure out how to have a user enter in a filename not select one using the mouse but entering in a new filename and have that name be saved into the current directory. I have look at getSelectedFile examples but it seems that those examples only have the user selecting a file for the directory listing. what i need is one that allows the user to enter in a new file name. thanks to all that can help

  2. #2
    doWhile is offline Moderator
    Join Date
    Jul 2010
    Rep Power

    Default Re: jFilechooser

    You don't provide any code for guidance, which doesn't help us help you. Did you use the JFileChooser method showSaveDialog? (and please spell correctly, jfilechooser != JFileChooser - we are programmers, and oftentimes our brains work like compilers, meaning jfilechooser does not compile)

  3. #3
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Madgaon, Goa, India
    Rep Power

    Default Re: jFilechooser

    JFileChooser allows entering a file name. To create a new file, look at the methods of the File class.

    There are also other ways to create a file. You may find some here: File I/O (Featuring NIO.2) (The Java™ Tutorials > Essential Classes > Basic I/O)

    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. jFileChooser
    By ArneBassez in forum AWT / Swing
    Replies: 7
    Last Post: 12-01-2010, 04:38 AM
  2. Jfilechooser
    By greatmajestics in forum Java 2D
    Replies: 5
    Last Post: 03-30-2010, 06:13 PM
  3. help with JFileChooser
    By morgatron in forum New To Java
    Replies: 1
    Last Post: 01-08-2010, 09:00 AM
  4. JfileChooser Help
    By simmi in forum AWT / Swing
    Replies: 9
    Last Post: 08-04-2009, 02:24 AM
  5. how to use JFileChooser
    By tommy in forum New To Java
    Replies: 1
    Last Post: 08-06-2007, 08:49 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts