+ 1
Point(2D) in JavaFX
Hello. If I want to define a point in Java 2D with Canvas, which class must I use? I tried it with the class Point2D but it didn't worked. Thank you for any help.
6 Antworten
+ 1
import javafx.geometry.Point2D;
+ 1
@Tom it doesn't works... or I make a mistake.
+ 1
I also tried to say
Point2D center = new Point2D(100, 100);
System.out.println(center.getX(), center.getY());
The output was 0 0
+ 1
EDIT: it works now. It only doesn't works in one method. In the other method it works. I don't know why, but it works now.. Thank you for your help.
0
Try 100.0 istead of 100
0
Your welcome :p ☺