Trying different layouts
This commit is contained in:
parent
df420ea81b
commit
4d488b419c
@ -1,5 +1,9 @@
|
||||
package application;
|
||||
|
||||
import javafx.geometry.HPos;
|
||||
import javafx.geometry.Insets;
|
||||
import javafx.geometry.Pos;
|
||||
import javafx.geometry.VPos;
|
||||
import javafx.scene.control.Button;
|
||||
import javafx.scene.layout.FlowPane;
|
||||
import javafx.scene.layout.GridPane;
|
||||
@ -10,9 +14,9 @@ public class RootGridPane extends GridPane {
|
||||
// Button btLaden;
|
||||
// Button btSpeichern;
|
||||
|
||||
Button btButton1, btLaden, btSpeichern;
|
||||
Button btButton4, btButton5, btButton6, btButtonSieben, btButtonAcht;
|
||||
FlowPane fpRechtsUnten;
|
||||
private Button btButton1, btLaden, btSpeichern;
|
||||
private Button btButton4, btButton5, btButton6, btButtonSieben, btButtonAcht;
|
||||
private FlowPane fpRechtsUnten;
|
||||
|
||||
public RootGridPane() {
|
||||
initComponents();
|
||||
@ -22,11 +26,17 @@ public class RootGridPane extends GridPane {
|
||||
public void initComponents() {
|
||||
|
||||
btButton1 = new Button("Button1");
|
||||
btButton1.setPrefSize(200, 200);
|
||||
btButton1.setPrefSize(100, 100);
|
||||
btButton1.setAlignment(Pos.BOTTOM_RIGHT);
|
||||
|
||||
btLaden = new Button("Laden-Button");
|
||||
btLaden.setPrefSize(200, 200);
|
||||
btLaden.setAlignment(Pos.TOP_CENTER);
|
||||
|
||||
btSpeichern = new Button("Speichern-Button");
|
||||
btSpeichern.setPrefSize(200, 200);
|
||||
btSpeichern.setAlignment(Pos.BOTTOM_LEFT);
|
||||
|
||||
btButton4 = new Button("Button vier");
|
||||
btButton5 = new Button("Button5");
|
||||
btButton6 = new Button("Button 6");
|
||||
@ -35,6 +45,13 @@ public class RootGridPane extends GridPane {
|
||||
|
||||
fpRechtsUnten = new FlowPane();
|
||||
fpRechtsUnten.setPrefSize(200, 200);
|
||||
fpRechtsUnten.setAlignment(Pos.CENTER_LEFT);
|
||||
fpRechtsUnten.setPadding(new Insets(10));
|
||||
fpRechtsUnten.setHgap(10);
|
||||
fpRechtsUnten.setVgap(10);
|
||||
|
||||
GridPane.setHalignment(btButton1, HPos.CENTER);
|
||||
GridPane.setValignment(btButton1, VPos.BOTTOM);
|
||||
}
|
||||
|
||||
public void addComponents() {
|
||||
@ -47,5 +64,4 @@ public class RootGridPane extends GridPane {
|
||||
fpRechtsUnten.getChildren().addAll(btButton4, btButton5, btButton6, btButtonSieben, btButtonAcht);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user