I've recently discovered renjin and its great at making R easy to use in java. However I'm having some issues with my main use of R, which is data visualisation, and getting the R plots into my swing application. My aim is to simply allow the user to run an R script from the swing application and for the resulting ggplot2 grpah to be shown in the swing panel. I have used
textPane.setText(engine.eval(new java.io.FileReader("/Users/sebastianzeki/Desktop/TBBdf.R")).toString());
in order to provide a text output to a textPane but how would I go about showing a graph and in what kind of pane?