Simple GIS

GISプログラムの練習

FX LINE

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 {
    
    public static void main(String[] args) {
        launch(args);
    }
    
    @Override
    public void start(Stage primaryStage) {
       
     
 Line ln=new Line(600,100,100,600);
 ln.setStroke(Color.RED);
        
        
        Text t = new Text(100,100,"消費");
       
        
        
Group root = new Group();
Scene scene = new Scene(root, 700, 700);    

root.getChildren().add(t);
root.getChildren().add(ln);

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

    
}