Does anyone know how to use JFileChooser ???


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

  • : 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
    chamster@home.se
    http://konrads.webbsida.com

  • all right man thanks for your hint. Ill look the FileFilter up

    Thanks and take care
  • 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
    chamster@home.se
    http://konrads.webbsida.com

Sign In or Register to comment.

Howdy, Stranger!

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

Categories