#344 Remember previous image save directory

David Benn

The save-image feature (for plots) should remember the last directory saved to! It's really annoying when saving multiple plots when it doesn't!


  • David Benn

    David Benn - 2013-04-10

    What's slightly annoying is that JFreeChart has these methods:

    File dir = chart.getDefaultDirectoryForSaveAs();

    but doSaveAs() returns void so you can't find out what path was selected in the file chooser. getDefaultDirectoryForSaveAs() only returns what is set with setDefaultDirectoryForSaveAs().

    But I don't want to set an arbitrary directory, I want to have the last directory saved to remembered! Short of trying to find a static hook in JFileChooser or somewhere else in the Java class library, I don't know whether this can be done at all!

    The most recent version of JFreeChart (1.0.14in 2011) has no change to this API that I can see. There is a however a new development version on github so that needs to be explored.

    What can be done however, is just to use a different method to write an image and a regular JFileChooser, e.g.

    ChartUtilities.saveChartAsPNG(File file, JFreeChart chart, ...)

  • David Benn

    David Benn - 2013-04-30

    Fixed in 2.15.1

  • David Benn

    David Benn - 2013-04-30
    • status: open --> closed-fixed

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks