Purpose
Here is a reusable bit of code that provides a quick wrapper for a Swing component that allows it to be used inside of a JavaFX Widget hierarchy.
This solution was derived from this thread on the forums.
Code
Code |
---|
|
If you need more details on making reusable JavaFX code, be sure to read Referencing other JavaFX files.
Usage
Here is a quick example of usage of SwingWidget. Note that the data provided in the tree comes from the default tree model, and not something special in JavaFX.
Community content is available under CC-BY-SA unless otherwise noted.