i need make copy of existing jfreechart , associate several times mouse click here trying:
public void chartmouseclicked(chartmouseevent event) { jfreechart tempchart = existingchart; chartpanel panel = new chartpanel(tempchart); //view frame } the same variable used several times. problem encounter is, previous chart gets replaced when make second mouse click.
is there way create fresh copy somehow ?
as discussed in comments, use standard object function clone() copy objects in majority of circumstances.
for record, did jfreechart javadoc check. documentation friend.
Comments
Post a Comment