Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ノードが表示されるレイヤーを選択し、プログラムの過程で変更できるようにしたいと考えています。
最後に追加されたノードが前のノードの上に表示されることはわかっています。
Swing では、JLayeredPane とそのメソッド setLayout(JComponent, integer) を使用します。int が高いほど、コンポーネントが画面に表示されるレベルが高くなります。
似たようなものはありますか?
ありがとうございました
の組み合わせで、子ノードの z オーダー インデックスを操作できると思います。
Node node = pane.getChildren().get(index); Node node = pane.getChildren().remove(index); pane.getChildren().add(newIndex, node);