JavaFX Bug March 8th, 2023

I was trying to add a new Label Component to a Vertical Box (VBox Component) from a separate thread and it appears to block the thread. I do not have the same problem with the ImageView component.

VBox.getChildren().add(newLabelNode)

appears to work different in practice than

ImageView.setImage(image)

when called from another thread, ImageView updates, VBox does not and the call blocks the current thread.

I can work around using an on mouse move event that lets

VBox.getChildren().add(newLabelNode) work

Trying to dispatch a custom render event from a separate thread also blocks.

Threading is useful, able to add components is useful. Not working together out of the box is not all ideal.

Published by techinfodebug

Flex and Java Developer, Christian, Art, Music, Video, and Vlogging

Leave a comment