Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Does anyone know how to use JFileChooser ???

adnakouladnakoul Member Posts: 68

Hey yall, hope ure in good shape. I want to be able to store a file read from textfields in a program that Im doing. And I want to store in any directory I want on my system. I think that JFileChooser would be the best to use, but the only samples I have deals with ".gif" or ".jpg" extensions. How to make a ".doc" ?

Muchas muchas gracias

Comments

  • chamsterchamster Member Posts: 662
    : Hey yall, hope ure in good shape. I want to be able to store a file read from textfields in a program that Im doing. And I want to store in any directory I want on my system. I think that JFileChooser would be the best to use, but the only samples I have deals with ".gif" or ".jpg" extensions. How to make a ".doc" ?

    I believe you will need to look into FileFilter class. Also, as far as i remember, the JFileChooser will get you an instance of File-type. It doesn't do any actual loading/saving so you can't have JFileChooser for a gif or jpeg. Either you do have JFC or you don't (and you do :-)).


    Kind Regards
    Konrad
    ----------------------------
    (+46/0) 708-70 73 92
    [email protected]
    http://konrads.webbsida.com

  • adnakouladnakoul Member Posts: 68
    all right man thanks for your hint. Ill look the FileFilter up

    Thanks and take care
  • chamsterchamster Member Posts: 662
    Yes, go ahead and do that. There's a pretty nice example at Sun's site. If you get stuck, i think i have a some code somewhere as well.

    Anyway, good luck with that.


    Kind Regards
    Konrad
    ----------------------------
    (+46/0) 708-70 73 92
    [email protected]
    http://konrads.webbsida.com

  • Chris BrownChris Brown USAMember Posts: 4,624 ✭✭

    ____ | http://forcoder.org | free video tutorials and ebooks about ( Objective-C Java Delphi PHP MATLAB C# C Go C++ Visual Basic PL/SQL Python Perl Swift Assembly Visual Basic .NET JavaScript Scratch Ruby R FoxPro Julia Logo Dart Scheme Hack Apex Rust Ada Lua Clojure Prolog Scala Erlang VBScript Transact-SQL ML LabVIEW SAS Fortran Bash ABAP Alice COBOL Lisp D Awk Crystal Kotlin F# ) ____

Sign In or Register to comment.