JavaFX GridPane - Circle auf Rectangle versetzten

undercover

Aktives Mitglied
Moin Leute,
ein neuer Tag eine neue Frage.
Bin gerade dabei eine GUI für ein Brettspiel zu schreiben und arbeite gerade an meiner letzten Scene.
Die Scene soll die aktuelle Position der Spieler anzeigen. Jedes mal wenn gewürfelt wird , soll der Spieler versetzt werden.
Meine FXML ist folgendermaßen aufgebaut.
Java:
<AnchorPane prefHeight="600.0" prefWidth="700.0" xmlns="http://javafx.com/javafx/8.0.111" xmlns:fx="http://javafx.com/fxml/1" fx:controller="Controller">
   <children>
      <VBox alignment="CENTER" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
         <children>
            <HBox alignment="CENTER" prefHeight="520.0" prefWidth="700.0">
               <children>
                  <GridPane alignment="CENTER" gridLinesVisible="true" prefHeight="509.0" prefWidth="702.0">
                    <columnConstraints>
                        <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
                      <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
                      <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
                        <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
                        <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
                        <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
                        <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
                        <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
                    </columnConstraints>
                    <rowConstraints>
                      <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
                      <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
                      <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
                        <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
                        <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
                        <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
                        <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
                        <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
                    </rowConstraints>
                     <children>
                        <Rectangle fx:id="f0" arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="64.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #c8c8c8;" width="89.0" />
                        <Rectangle fx:id="f1" arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="64.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #9c68a4;" width="89.0" GridPane.columnIndex="1" />
                        <Rectangle fx:id="f2" arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="64.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #9c68a4;" width="89.0" GridPane.columnIndex="2" />
                        <Rectangle fx:id="f3" arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="64.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #9c68a4;" width="89.0" GridPane.columnIndex="3" />
                        <Rectangle fx:id="f4" arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="64.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #9c68a4;" width="89.0" GridPane.columnIndex="4" />
                        <Rectangle fx:id="f5" arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="64.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #520a00;" width="89.0" GridPane.columnIndex="5" />
                        <Rectangle fx:id="f6" arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="64.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #329f9c;" width="89.0" GridPane.columnIndex="6" />
                        <Rectangle fx:id="f7" arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="64.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #9c68a4;" width="89.0" GridPane.columnIndex="7" />
                        <Rectangle fx:id="f8" arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="64.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #9c68a4;" width="89.0" GridPane.columnIndex="7" GridPane.rowIndex="1" />
                        <Rectangle fx:id="f9" arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="64.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #520a00;" width="89.0" GridPane.columnIndex="6" GridPane.rowIndex="1" />
                        <Rectangle fx:id="f10" arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="64.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #9c68a4;" width="89.0" GridPane.columnIndex="5" GridPane.rowIndex="1" />
                        <Rectangle fx:id="f11" arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="64.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #9c68a4;" width="89.0" GridPane.columnIndex="4" GridPane.rowIndex="1" />
                        <Rectangle fx:id="f12" arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="64.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #9c68a4;" width="89.0" GridPane.columnIndex="3" GridPane.rowIndex="1" />
                        <Rectangle fx:id="f13" arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="64.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #9c68a4;" width="89.0" GridPane.columnIndex="2" GridPane.rowIndex="1" />
                        <Rectangle fx:id="f14" arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="64.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #329f9c;" width="89.0" GridPane.columnIndex="1" GridPane.rowIndex="1" />
                        <Rectangle fx:id="f15" arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="64.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #9c68a4;" width="89.0" GridPane.rowIndex="1" />
                        <Rectangle fx:id="f16" arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="64.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #9c68a4;" width="89.0" GridPane.rowIndex="2" />
                        <Rectangle fx:id="f17" arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="64.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #9c68a4;" width="89.0" GridPane.columnIndex="1" GridPane.rowIndex="2" />
                        <Rectangle fx:id="f18" arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="64.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #329f9c;" width="89.0" GridPane.columnIndex="2" GridPane.rowIndex="2" />
                        <Rectangle fx:id="f19" arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="64.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #520a00;" width="89.0" GridPane.columnIndex="3" GridPane.rowIndex="2" />
                        <Rectangle fx:id="f20" arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="64.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #9c68a4;" width="89.0" GridPane.columnIndex="4" GridPane.rowIndex="2" />
                        <Rectangle fx:id="f21" arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="64.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #9c68a4;" width="89.0" GridPane.columnIndex="5" GridPane.rowIndex="2" />
                        <Rectangle fx:id="f22" arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="64.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #9c68a4;" width="89.0" GridPane.columnIndex="6" GridPane.rowIndex="2" />
                        <Rectangle fx:id="f23" arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="64.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #520a00;" width="89.0" GridPane.columnIndex="7" GridPane.rowIndex="2" />
                        <Rectangle fx:id="f24" arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="64.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #9c68a4;" width="89.0" GridPane.columnIndex="7" GridPane.rowIndex="3" />
                        <Rectangle fx:id="f25" arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="64.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #9c68a4;" width="89.0" GridPane.columnIndex="6" GridPane.rowIndex="3" />
                        <Rectangle fx:id="f26" arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="64.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #9c68a4;" width="89.0" GridPane.columnIndex="5" GridPane.rowIndex="3" />
                        <Rectangle fx:id="f27" arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="64.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #329f9c;" width="89.0" GridPane.columnIndex="4" GridPane.rowIndex="3" />
                        <Rectangle fx:id="f28" arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="64.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #9c68a4;" width="89.0" GridPane.columnIndex="3" GridPane.rowIndex="3" />
                        <Rectangle fx:id="f29" arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="64.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #9c68a4;" width="89.0" GridPane.columnIndex="2" GridPane.rowIndex="3" />
                        <Rectangle fx:id="f30" arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="64.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #9c68a4;" width="89.0" GridPane.columnIndex="1" GridPane.rowIndex="3" />
                        <Rectangle fx:id="f31" arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="64.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #329f9c;" width="89.0" GridPane.rowIndex="3" />
                        <Rectangle fx:id="f32" arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="64.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #329f9c;" width="89.0" GridPane.rowIndex="4" />
                        <Rectangle fx:id="f33" arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="64.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #9c68a4;" width="89.0" GridPane.columnIndex="1" GridPane.rowIndex="4" />
                        <Rectangle fx:id="f34" arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="64.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #9c68a4;" width="89.0" GridPane.columnIndex="2" GridPane.rowIndex="4" />
                        <Rectangle fx:id="f35" arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="64.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #9c68a4;" width="89.0" GridPane.columnIndex="3" GridPane.rowIndex="4" />
                        <Rectangle fx:id="f36" arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="64.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #329f9c;" width="89.0" GridPane.columnIndex="4" GridPane.rowIndex="4" />
                        <Rectangle fx:id="f37" arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="64.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #9c68a4;" width="89.0" GridPane.columnIndex="5" GridPane.rowIndex="4" />
                        <Rectangle fx:id="f38" arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="64.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #9c68a4;" width="89.0" GridPane.columnIndex="6" GridPane.rowIndex="4" />
                        <Rectangle fx:id="f39" arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="64.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #9c68a4;" width="89.0" GridPane.columnIndex="7" GridPane.rowIndex="4" />
                        <Rectangle fx:id="f40" arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="64.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #9c68a4;" width="89.0" GridPane.columnIndex="7" GridPane.rowIndex="5" />
                        <Rectangle fx:id="f41" arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="64.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #520a00;" width="89.0" GridPane.columnIndex="6" GridPane.rowIndex="5" />
                        <Rectangle fx:id="f42" arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="64.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #520a00;" width="89.0" GridPane.columnIndex="5" GridPane.rowIndex="5" />
                        <Rectangle fx:id="f43" arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="64.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #9c68a4;" width="89.0" GridPane.columnIndex="4" GridPane.rowIndex="5" />
                        <Rectangle fx:id="f44" arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="64.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #9c68a4;" width="89.0" GridPane.columnIndex="3" GridPane.rowIndex="5" />
                        <Rectangle fx:id="f45" arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="64.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #520a00;" width="89.0" GridPane.columnIndex="2" GridPane.rowIndex="5" />
                        <Rectangle fx:id="f46" arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="64.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #9c68a4;" width="89.0" GridPane.columnIndex="1" GridPane.rowIndex="5" />
                        <Rectangle fx:id="f47" arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="64.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #9c68a4;" width="89.0" GridPane.rowIndex="5" />
                        <Rectangle fx:id="f48" arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="64.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #9c68a4;" width="89.0" GridPane.rowIndex="6" />
                        <Rectangle fx:id="f49" arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="64.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #9c68a4;" width="89.0" GridPane.columnIndex="1" GridPane.rowIndex="6" />
                        <Rectangle fx:id="f50" arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="64.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #329f9c;" width="89.0" GridPane.columnIndex="2" GridPane.rowIndex="6" />
                        <Rectangle fx:id="f51" arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="64.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #9c68a4;" width="89.0" GridPane.columnIndex="3" GridPane.rowIndex="6" />
                        <Rectangle fx:id="f52" arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="64.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #329f9c;" width="89.0" GridPane.columnIndex="4" GridPane.rowIndex="6" />
                        <Rectangle fx:id="f53" arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="64.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #9c68a4;" width="89.0" GridPane.columnIndex="5" GridPane.rowIndex="6" />
                        <Rectangle fx:id="f54" arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="64.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #520a00;" width="89.0" GridPane.columnIndex="6" GridPane.rowIndex="6" />
                        <Rectangle fx:id="f55" arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="64.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #9c68a4;" width="89.0" GridPane.columnIndex="7" GridPane.rowIndex="6" />
                        <Rectangle fx:id="f56" arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="64.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #9c68a4;" width="89.0" GridPane.columnIndex="7" GridPane.rowIndex="7" />
                        <Rectangle fx:id="f57" arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="64.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #9c68a4;" width="89.0" GridPane.columnIndex="6" GridPane.rowIndex="7" />
                        <Rectangle fx:id="f58" arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="64.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #520a00;" width="89.0" GridPane.columnIndex="5" GridPane.rowIndex="7" />
                        <Rectangle fx:id="f59" arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="64.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #329f9c;" width="89.0" GridPane.columnIndex="4" GridPane.rowIndex="7" />
                        <Rectangle fx:id="f60" arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="64.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #9c68a4;" width="89.0" GridPane.columnIndex="3" GridPane.rowIndex="7" />
                        <Rectangle fx:id="f61" arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="64.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #9c68a4;" width="89.0" GridPane.columnIndex="2" GridPane.rowIndex="7" />
                        <Rectangle fx:id="f62" arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="64.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #9c68a4;" width="89.0" GridPane.columnIndex="1" GridPane.rowIndex="7" />
                        <Rectangle fx:id="f63" arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="64.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #006400;" width="89.0" GridPane.rowIndex="7" />
                        <Circle fx:id="BLAU" fill="DODGERBLUE" radius="12.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #1510eb;">
                           <GridPane.margin>
                              <Insets left="2.0" top="-35.0" />
                           </GridPane.margin>
                        </Circle>
                        <Circle fx:id="GELB" fill="DODGERBLUE" radius="12.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #fff468;">
                           <GridPane.margin>
                              <Insets left="30.0" top="-35.0" />
                           </GridPane.margin>
                        </Circle>
                        <Circle fx:id="ROT" fill="DODGERBLUE" radius="12.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #cd5c5c;">
                           <GridPane.margin>
                              <Insets left="60.0" top="-35.0" />
                           </GridPane.margin>
                        </Circle>
                        <Circle fx:id="SCHWARZ" fill="DODGERBLUE" radius="12.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #051403;">
                           <GridPane.margin>
                              <Insets left="2.0" top="35.0" />
                           </GridPane.margin>
                        </Circle>
                        <Circle fx:id="GRUEN" fill="DODGERBLUE" radius="12.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #49e76c;">
                           <GridPane.margin>
                              <Insets left="30.0" top="35.0" />
                           </GridPane.margin>
                        </Circle>
                        <Circle fx:id="WEISS" fill="DODGERBLUE" radius="12.0" stroke="BLACK" strokeType="INSIDE" style="-fx-fill: #ffffff;">
                           <GridPane.margin>
                              <Insets left="60.0" top="35.0" />
                           </GridPane.margin>
                        </Circle>
                     </children>
                  </GridPane>
               </children>
            </HBox>
            <HBox alignment="CENTER" maxHeight="-Infinity" prefHeight="100.0" prefWidth="200.0" spacing="60.0">
               <children>
                  <Label fx:id="player" onDragDetected="#handlePlayer" text="Spieler">
                     <font>
                        <Font name="Lucida Console" size="18.0" />
                     </font>
                  </Label>
                  <Button fx:id="rollDice" disable="false" mnemonicParsing="false" onAction="#handleRollDice" text="roll dice">
                     <font>
                        <Font name="Lucida Console" size="15.0" />
                     </font></Button>
                  <Label fx:id="actualyField" text="Feld">
                     <font>
                        <Font name="Lucida Console" size="18.0" />
                     </font>
                  </Label>
               </children>
            </HBox>
         </children>
      </VBox>
   </children>
</AnchorPane>

Ich habe eine Klasse Spieler , in dem die Position des Spielers gespeichert wird.
Wie ist es möglich die Circle (repräsentieren Spieler) nach jedem Wurf zu versetzten?
Ist das Konstrukt von GridPane-Rectange-Circle überhaupt dafür geeignet?
Hatte im ersten Versuch GridPane-Pane-Circle.

Gruß
 

dzim

Top Contributor
Ich versuche es die ganze Zeit zu schnallen, aber ich komm nicht draus. Die Rectangles sind Spielfelder?
Wenn ja: Nimm ein Layout (ich persönlich würde StackPane verwenden) und füge einen Circle jeweils dem StackPane im Grid hinzo, wo ein Spieler sein soll...
Wie gesagt: Ich verstehe den Text schon nicht ganz, daher sehe ich auch kein echtes Problem (jedenfalls in meiner Interpretation deiner Frage).
 
Ähnliche Java Themen
  Titel Forum Antworten Datum
N Dropshadow setzen bei einer Gruppe von Tiles, die sich jeweils in einer Stackpane befinden, welche in einer Gridpane angeordnet sind. AWT, Swing, JavaFX & SWT 0
H JavaFX GridPane getBoundsInParent() AWT, Swing, JavaFX & SWT 0
B Überlappung im GridPane AWT, Swing, JavaFX & SWT 2
S ImageView wird dem Gridpane nicht zugefügt AWT, Swing, JavaFX & SWT 1
S Skallierung von Gridpane Inhalten AWT, Swing, JavaFX & SWT 1
S SceneBuilder gridpane erweitern AWT, Swing, JavaFX & SWT 0
K 2048 Umsetzung mit Gridpane / Stackpane und / Rectangle AWT, Swing, JavaFX & SWT 0
B GridPane erweitern AWT, Swing, JavaFX & SWT 0
L JavaFX Gridpane mit gleich großen Spalten AWT, Swing, JavaFX & SWT 23
J Gridpane Breite in Scrollpane automatisch anpassen AWT, Swing, JavaFX & SWT 2
J Aus welchen Grund wird der Button nicht angezeigt im GridPane? AWT, Swing, JavaFX & SWT 1
I ImageView in GridPane: Bildgröße AWT, Swing, JavaFX & SWT 1
S JavaFX GridPane Zellen Seitenverhätnis passend ändern mit der Stage AWT, Swing, JavaFX & SWT 0
N JavaFX GridPane Halignment funktioniert nicht AWT, Swing, JavaFX & SWT 1
Joker4632 JavaFX GridPane richtig implementieren AWT, Swing, JavaFX & SWT 7
H Button in GridPane wird nicht angenommen AWT, Swing, JavaFX & SWT 3
H JavaFX GridPane: Zellenfarbe setzen AWT, Swing, JavaFX & SWT 9
G JavaFX CSS: Label in GridPane rechts ausrichten AWT, Swing, JavaFX & SWT 9
U Was genau bewirkt Rectangle in 2dGraphics? AWT, Swing, JavaFX & SWT 1
R AWT Rectangle mit Angle AWT, Swing, JavaFX & SWT 10
N JavaFX Group: Gezieltes entfernen eines Objects (Rectangle) AWT, Swing, JavaFX & SWT 0
J JavaFX Rectangle innerhalb eines Rectangle oder Panes positionieren? AWT, Swing, JavaFX & SWT 1
G Rectangle Breite richtet such an die Breite vom Text AWT, Swing, JavaFX & SWT 1
L JavaFX Rectangle mit Dock-Mechanismus AWT, Swing, JavaFX & SWT 3
K JavaFX TableView mit Rectangle AWT, Swing, JavaFX & SWT 3
F Problem mit der FXML Rectangle Shape AWT, Swing, JavaFX & SWT 2
T Rectangle Transparent und darunter liegende Objekte Bedienbar AWT, Swing, JavaFX & SWT 0
J Rectangle g.fillRec() X/Y Punkt AWT, Swing, JavaFX & SWT 5
TheSorm Rectangle drehen AWT, Swing, JavaFX & SWT 9
S Rectangle Border Color AWT, Swing, JavaFX & SWT 13
P drawString in einem Rectangle AWT, Swing, JavaFX & SWT 4
P Rectangle verschieben AWT, Swing, JavaFX & SWT 11
P ImageIcon auf Rectangle AWT, Swing, JavaFX & SWT 3
P Rectangle on JPanel zentrieren AWT, Swing, JavaFX & SWT 20
O 2D-Grafik Rectangle mit double Werten zeichnen AWT, Swing, JavaFX & SWT 3
T Rectangle Namen geben? Alternativen auch gerne gesehen. AWT, Swing, JavaFX & SWT 2
D 2D-Grafik Form der GrafikObjekte ändern, Ellipse -> Rectangle AWT, Swing, JavaFX & SWT 2
K AWT Rectangle klappt nicht AWT, Swing, JavaFX & SWT 7
R Resize Rectangle Problem AWT, Swing, JavaFX & SWT 3
Schandro Den größten passenden java.awt.Font zu einem Rectangle berechnen AWT, Swing, JavaFX & SWT 2
I Text innerhalb von Rectangle rendern AWT, Swing, JavaFX & SWT 3
H Rectangle[] ? AWT, Swing, JavaFX & SWT 5
I Rectangle mit floating values AWT, Swing, JavaFX & SWT 2
D Markieren mit Rectangle ? AWT, Swing, JavaFX & SWT 9
T PLAF MetalButtonUI Rectangle beseitigen AWT, Swing, JavaFX & SWT 4

Ähnliche Java Themen

Neue Themen


Oben