Results 1 to 5 of 5
  1. #1
    RichersooN is offline Senior Member
    Join Date
    Jan 2011
    Location
    Rizal Province, Philippiines
    Posts
    167
    Rep Power
    0

    Default Hi can I create a file using JFileChooser?

    Hi can I create a file using JFileChooser?
    And how can I do it? Please help me guys, I already google it and all I can see is it can only open and save to a file.

  2. #2
    doWhile is offline Moderator
    Join Date
    Jul 2010
    Location
    California
    Posts
    1,642
    Rep Power
    7

    Default

    Use showSaveDialog...get the selected File and write the contents of said file.

    See How to Use File Choosers (The Java™ Tutorials > Creating a GUI With JFC/Swing > Using Swing Components)

  3. #3
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,188
    Rep Power
    19

    Default

    You *create* a file using the java.io.File API. Look it up.

    db

  4. #4
    RichersooN is offline Senior Member
    Join Date
    Jan 2011
    Location
    Rizal Province, Philippiines
    Posts
    167
    Rep Power
    0

    Default

    hehe I already answer my own concerns, but you can feel free to response... But I think I had a brain damaged

  5. #5
    asmitarnd is offline Member
    Join Date
    Mar 2011
    Posts
    22
    Rep Power
    0

    Default

    u can create a filechooser using FileChooser class in java.with this u can also browse files from ur pc

Similar Threads

  1. Jfilechooser removing all file types
    By counterfox in forum New To Java
    Replies: 2
    Last Post: 02-15-2011, 10:55 AM
  2. [JFileChooser] File name to list
    By Che999po in forum AWT / Swing
    Replies: 8
    Last Post: 07-30-2010, 10:09 PM
  3. Saving to file from JFileChooser SaveDialog
    By kieran82 in forum AWT / Swing
    Replies: 2
    Last Post: 03-16-2010, 03:09 AM
  4. how to use JFileChooser to select file -> string
    By gezzel in forum AWT / Swing
    Replies: 15
    Last Post: 10-23-2008, 05:34 AM
  5. how to use JFileChooser to select file -> string
    By gezzel in forum New To Java
    Replies: 9
    Last Post: 09-18-2008, 09:45 PM

Tags for this Thread

Posting Permissions

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