Simple GIS

GISプログラムの練習

FX LINE

package graph;

import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
import javafx.scene.shape.Line;
import javafx.scene.Group;



public class pro extends Application {
    
    
    Line lx=new Line[100];
   
    public static void main(String args) {
        launch(args);
    }
    
    @Override
    public void start(Stage primaryStage) {
        
        int s;
        
        for(s=1;s<50;s++){
        lx[s]=new Line();
        lx[s].setStartX(10*s);
lx[s].setStartY(10*s);
lx[s].setEndX(10*s+10);
lx[s].setEndY(10*s+10);
        }

       
       
        Group root = new Group();

Scene scene = new Scene(root, 700, 700); 
 for(s=1;s<50;s++){
root.getChildren().add(lx[s]);
 }   
        primaryStage.setTitle("Hello World!");
        primaryStage.setScene(scene);
        primaryStage.show();
    }

}