Search code examples
jfreechart

JFreeCharts demo does not allows copy to clipboard from the Source panes?


In the screenshot below we see the (useful!) source code for an XYPlot chart. The problem is - well if I were to actually want to use the code .. how to do it? Notice that the Edit menu item is disabled. So presumably there may have been cut and paste there .. but ..

So is there a workaround for this (well .. besides whipping out iTerm, cutting to the directory of the source and launching vim manually ..)

enter image description here


Solution

  • This is an oversight in the demo application. The 'Edit' menu is used to copy and paste chart images when charts are being viewed. The menu is disabled for the other tabs.

    It does, of course, make sense that the user should be able to copy and paste the demo source code from the 'Source Code' tab rather than be required to find the relevant source file in the download. I will update the code to enable this.