How can i hide an item in HBox, and made space used by this item available to other items.
TitledPane legendPane = new TitledPane("Legend", _legend);
legendPane.setVisible(false);
LineChart chart = new LineChart<Number, Number>(_xAxis, _yAxis);
HBox hbox = new HBox(5);
hbox.getChildren().addAll(legendPane, chart);
In the above code i want the chart node to use all available space when the legend pane is hidden.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…