Package javafx.embed.swing
Defines APIs for the JavaFX / Swing interop support included with the
JavaFX UI toolkit, including SwingNode
(for
embedding Swing inside a JavaFX application) and
JFXPanel
(for embedding JavaFX inside a Swing
application).
The JFXPanel
class defines a
lightweight Swing component, which accepts and renders an instance of
Scene
and forwards all input events from Swing
to the attached JavaFX scene.
The SwingNode
class is used to embed
a Swing content into a JavaFX application.
The content to be displayed is specified with the SwingNode.setContent
method
that accepts an instance of a Swing JComponent
. The hierarchy of components
contained in the JComponent
instance should not contain any heavyweight
components, otherwise SwingNode
may fail to paint it. The content gets
repainted automatically. All the input and focus events are forwarded to the
JComponent
instance.
-
ClassDescription
JFXPanel
is a component to embed JavaFX content into Swing applications.This class provides utility methods for converting data types between Swing/AWT and JavaFX formats.This class is used to embed a Swing content into a JavaFX application.