import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.layout.Pane; import javafx.stage.Stage; import javafx.scene.shape.Rectangle; import javafx.scene.paint.Color; import javafx.stage.Window; import javafx.scene.shape.Shape; import java.util.ArrayList; import javafx.scene.control.Label; /** * * Beschreibung * * @version 1.0 vom 25.09.2025 * @author */ public class Muehle extends Application { // start attributes // end attributes private Label lTop = new Label(); public void start(Stage primaryStage) { Pane root = new Pane(); Pane game_board = draw_game_board(); root.getChildren().addAll(lTop,game_board); Scene scene = new Scene(root, 1080, 820); setTopLabel("Test Label"); primaryStage.setOnCloseRequest(e -> System.exit(0)); primaryStage.setTitle("Muehle"); primaryStage.setScene(scene); primaryStage.show(); } // end of public Muehle public void setTopLabel(String value) { lTop.setText(value); } // start methods public Pane draw_game_board() { Color bg_color = Color.rgb(255,255,0); Color stroke_color = Color.rgb(250, 250, 50); ArrayList shapes = new ArrayList(); Pane board = new Pane(); double topLeftX = (1080/2)-400; double topLeftY = 720-(720/2)-300; double topRightX =(1080/2)+200; double topRightY = (720/2)+300; Rectangle bg = new Rectangle(topLeftX,topLeftY,topRightX,topRightY); bg.setFill(bg_color); shapes.add(bg); for (int i = 0; i < shapes.size() ;i++ ) { board.getChildren().add(shapes.get(i)); } // end of for return board; } // end methods } // end of class Muehle