-1
그래서 내가 읽은 좌표 파일을 가지고 그 파일에서 좌표를 가져 와서 끝까지 각 좌표를 읽고 객체 배열에 저장하는 루프를 만들었습니다/개체의 포인트. 어떻게 그 점을 그려 내고 모든 좌표를 쓰지 않고 선을 연결하는 방법이라고 부릅니까? 루프와 읽기 텍스트 파일JavaFX | 어떻게 점을 그리고 라인을 연결하는 방법을 호출하는 방법
try {
// create the file reader instance
FileReader fReader = new FileReader(fileName);
// create a scanner to scan through the file
Scanner scan = new Scanner (fReader);
// loop
while (scan.hasNext()) {
int i = 0;
int x = scan.next();
int y = scan.next();
Point[] = null;
array[i] = point;
i++;
}
// close the reader
fReader.close();
} catch (IOException e) {
System.out.println(e.getMessage());
}
return 0;
}
의 라인을 따라 뭔가를 시도? 당신이 시도한 것을 보자. – Steven
Canvas 또는 Nodes를 사용하고 있습니까? – Sedrick
그림 선 : http://www.java2s.com/Tutorials/Java/JavaFX/0040__JavaFX_Line.htm – Sedrick