Simple GIS

GISプログラムの練習

復習 FX

package fx01;

import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.Group;
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.text.Text;
import javafx.scene.paint.Color;

public class pro extends Application {
    
  int s;  
   Line lx=new Line[50];
    
    public static void main(String args) {
        launch(args);
    }
    
    @Override
    public void start(Stage primaryStage) {
       
     
 for(s=1;s<50;s++){       
 lx[s]=new Line(10*s,10*s,10*s+10,10*s+10);
 lx[s].setStroke(Color.RED);
 }      
        
 Text t = new Text(100,100,"風");
       
        
        
Group root = new Group();
Scene scene = new Scene(root, 700, 700);    

root.getChildren().add(t);

for(s=1;s<50;s++){ 
root.getChildren().add(lx[s]);
}


primaryStage.setTitle("練習");
        primaryStage.setScene(scene);
        primaryStage.show();
    }

    
}