A
A
Anton @ Lyalin2017-04-14 11:48:14
JavaFX
Anton @ Lyalin, 2017-04-14 11:48:14

How to access components of another window?

There are two windows and, accordingly, two controllers, how can the second controller access the element of the first window ???

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Alexandrov, 2017-04-14
@jamakasi666

FooController foo = (FooController) fxmlLoader.getController();
foo.setSomeData();

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question