Displaying String/Label in JavaFX

后端 未结 2 1332
感情败类
感情败类 2021-01-28 17:33

I need help figouring out simply how to display a text in my program so that it can display \"Stop\" in the middle of my polygon shape I\'ve created. What I\'m trying to do is c

2条回答
  •  清酒与你
    2021-01-28 17:52

    Just change new Pane() to new StackPane() and add your label to the pane's child list like you do your Polygon.

    StackPane is a layout manager that allows you to layer items on top of each other (by default centering the layered items).

提交回复
热议问题