?
Solved

JFreeChart: XYCoordinate

Posted on 2011-04-23
2
Medium Priority
?
308 Views
Last Modified: 2012-05-11
I'm looking for any easy was to make a copy of an XYCoordinate object.
I don't see a copy constructor or a clone() method.
http://www.jfree.org/jfreechart/api/javadoc/org/jfree/data/xy/XYCoordinate.html

It seems the best I can do is:
new XYCoordinate (myXYCoordinate.getX(), myXYCoordinate.getY());

Is this it?
0
Comment
Question by:allelopath
  • 2
2 Comments
 
LVL 47

Accepted Solution

by:
for_yan earned 2000 total points
ID: 35453266
No you need
to have it like that:
XYCoordinate  one = new XYCoordinate(5.0, 10.0);
XYCoordinate second = new XYCoordinate(one.getX(), one.getY());
0
 
LVL 47

Assisted Solution

by:for_yan
for_yan earned 2000 total points
ID: 35453270
YOu are right, as they didn't override the clone() method, it would not work otherwise
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Suggested Courses
Course of the Month14 days, 8 hours left to enroll

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question