Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JFileChooser to save file

 
Danny Paul
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

i m new to java, i m trying to learn the GUI swing.

can anyone tell me how to save a file using JFileChooser.
i know a method jf.showSaveDialog(null). but how to use this method to save a file.

Danny
 
Rachel Swailes
Ranch Hand
Posts: 434
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Once you show the dialog, the user selects a file and then presses the APPROVE_BUTTON. After that it is up to you to physically save the file.


Cheers,
Rachel
 
chris forbes
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Campbell Ritchie
Sheriff
Pie
Posts: 50241
79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic