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.
私のアプリケーションには 2 つの TextArea があり、スクロールバーの 1 つを移動するときにスクロールバーを同期させたいと考えています。しかし、JavaFX 2.2 でそれを行う方法が見つかりません。
これは私のために働いた:
TextArea ta1 = new TextArea(), ta2 = new TextArea(); ta1.scrollTopProperty().bindBidirectional(ta2.scrollTopProperty());
一般的なケースでは、TextArea で lookupAll(String) 操作を適用して、TextArea 内のスクロール バーを検索し、それらの値を双方向にバインドできます。