I'm trying to extend Java's Point2D.Double class but having trouble with the constructor. The Double class is nested inside the Point2D class and I don't seem to have access to the
import java.awt.geom.Point2D.Double;
public class Coordinate extends java.awt.geom.Point2D.Double
{
public Coordinate(double x, double y)
{
Point2D.Double(x,y);
}
}
That code is just one attempt at getting it to work.
Question
FiREFLi
Hi,
I'm trying to extend Java's Point2D.Double class but having trouble with the constructor. The Double class is nested inside the Point2D class and I don't seem to have access to the
That code is just one attempt at getting it to work.
I've tried import java.awt.geom.Point2D, import java.awt.geom.*...
I've tried Double(x,y);, java.awt.geom.Point2D.Double(x,y);...
I've tried extends java.awt.geom.Point2D, extends Point2D, extends Point2D.Double...
Nothing will work!
It can't find the Double() method.
Any ides?
Link to comment
https://www.neowin.net/forum/topic/541064-java-extend-javaawtgeompoint2ddouble/Share on other sites
2 answers to this question
Recommended Posts