I have to create the architecture shown in the image below.
The inner components can be created very easily but in which container I would place them is the question. BorderPane, AnchorPane, GridPane.. These cannot contain JFXPanel as achild node.
Hence , the task is to convert the swing panel into jfxpanel. So each element should be of javafx.
JFXPanel is for embedding JavaFX scenes inside a Swing application, which doesn't sound like what your are doing, so a JFXPanel is probably the wrong component type to use for your application.
I guess (and I could be wrong) that your application is a JavaFX application in which you would like to embed a Swing component - in which case you use a SwingNode.
JavaFX scene
- JavaFX layout pane root
- JavaFX ScrollPane
- SwingNode
- Swing component
In general, mixing JavaFX and Swing is not usually recommended.
I note that your question is tagged javafx-2, so note that SwingNode only exists from Java 8 on; i.e., it does not exist in Java 7, so there is no way to accomplish the structure you outline in your question within the context of Java 7 or JavaFX 2.2.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments