Reputation: 58
I'm currently testing the integration of some JavaFX2 components in to a swing application.
I have a JFXPanel which contains an HBox Pane which holds a list of buttons. What I'm trying to achive is to hide and show some buttons and resize the HBox and the JFXPanel. Problems I'm facing:
So, How can I resize it ? I'm using FXML and controllers so I see no easy way of resizing the JFXPanel but I'm trying to see how can I manually set it, but how can this be done automatically ?
By the way, I'm not using absolute positioning in swing (no layout manager).
Upvotes: 1
Views: 1071
Reputation: 637
Try to remove the button from the HBox, not just hide it.
I have done the same with a ToolBar & it update its size when buttons are added or removed.
Upvotes: 1