JavaFx Focus on Pane with a Click

I need to be able to click focus on the panel. For most other nodes, this works by default - for some reason this does not work for the panel.

My scene:

Border> Scroll Panel> Anchor Panel> Panel

I tried calling pane.setFocusTraversable (), but then I can only insert into the plane. I need to be able to click on it.

Any ideas? Thanks in advance.

+4
source share

Source: https://habr.com/ru/post/1654951/


All Articles