titled-border

GroupBox / TitledBorder in JavaFX 2?

依然范特西╮ 提交于 2019-11-26 18:44:49
Is there something like a GroupBox or TitledBorder available on JavaFX 2? Thanks for any hint :-) jewelsea No such standard control, but it it is easy to create your own. Here is a sample implementation: /** Places content in a bordered pane with a title. */ class BorderedTitledPane extends StackPane { BorderedTitledPane(String titleString, Node content) { Label title = new Label(" " + titleString + " "); title.getStyleClass().add("bordered-titled-title"); StackPane.setAlignment(title, Pos.TOP_CENTER); StackPane contentPane = new StackPane(); content.getStyleClass().add("bordered-titled

GroupBox / TitledBorder in JavaFX 2?

柔情痞子 提交于 2019-11-26 08:09:15
问题 Is there something like a GroupBox or TitledBorder available on JavaFX 2? Thanks for any hint :-) 回答1: No such standard control, but it it is easy to create your own. Here is a sample implementation: /** Places content in a bordered pane with a title. */ class BorderedTitledPane extends StackPane { BorderedTitledPane(String titleString, Node content) { Label title = new Label(" " + titleString + " "); title.getStyleClass().add("bordered-titled-title"); StackPane.setAlignment(title, Pos.TOP