JavaFX cell location
-
I have a class that describes my right panel. GUI - button applications:
public class RightMenu extends GridPane {
public RightMenu() {
Button startButton = new Button("Старт"); Button stopButton = new Button("Стоп"); Button clearButton = new Button("Очистить график"); this.add(startButton, 0, 0); this.add(stopButton, 1, 0); this.add(clearButton, 0, 1); this.setPadding(new Insets(2, 2, 2, 2));
}
♪
It looks like this:
As you can see, the buttons are very curved. How am I supposed to make the "cleaning the schedule" button under both Star and Stop buttons? How do you even make the knob equal?
-
My version's a bit of a lachmat, but as an option, it does. The point is, instead of a net, you can charge a trick with Hbox and VBox. We take and create VBox and Hbox.
VBox vbox = new VBox(); HBox hbox = new HBox();
Those buttons that should be loaded in a row
hbox
hbox.getChildren().addAll(startButton, stopButton);
So we got a series of two buttons, and now we're building a pole from this row and another button.
vbox.getChildren().addAll(hbox, clearButton);
PS I hope there's an adequate way to connect the cells in the table. But that time, I didn't go looking and just do it. (Blagot) I also had a little panel.