public void setContent (JComponent content)

Attaches a JComponent instance to display in this SwingNode.

The method can be called either on the JavaFX Application thread or the Event Dispatch thread. Note however, that access to a Swing component must occur from the Event Dispatch thread according to the Swing threading restrictions.

Parameters:
content    a Swing component to display in this SwingNode

See also:
java.awt.EventQueue.isDispatchThread(), javafx.application.Platform.isFxApplicationThread()