Sub element from Controller to a new class
This commit is contained in:
@ -94,39 +94,7 @@ public class Controller extends Application {
|
||||
private Scene createLevel_menu(){
|
||||
bck_menu = new Button("Back to the menu");
|
||||
bck_menu.setOnAction(event -> switchScenes(Menu));
|
||||
GdP = new GridPane();
|
||||
Level_menu = new Scene(GdP,700,400);
|
||||
_1 = new Button("1");
|
||||
_2 = new Button("2");
|
||||
_3 = new Button("3");
|
||||
_4 = new Button("4");
|
||||
_5 = new Button("5");
|
||||
_6 = new Button("6");
|
||||
_7 = new Button("7");
|
||||
_8 = new Button("8");
|
||||
_9 = new Button("9");
|
||||
_10 = new Button("10");
|
||||
Day_2 = new Button("Day 2");
|
||||
Day_3 = new Button("Day 3");
|
||||
|
||||
//set up of the button
|
||||
GdP.add(Day_2,1,0);
|
||||
GdP.add(Day_3,1,0);
|
||||
GdP.add(_1,0,1);
|
||||
GdP.add(_2,1,1);
|
||||
GdP.add(_3,2,1);
|
||||
GdP.add(_4,0,2);
|
||||
GdP.add(_5,1,2);
|
||||
GdP.add(_6,2,2);
|
||||
GdP.add(_7,0,3);
|
||||
GdP.add(_8,1,3);
|
||||
GdP.add(_9,2,3);
|
||||
GdP.add(_10,1,4);
|
||||
GdP.add(bck_menu,2,4);
|
||||
//set up gap and padding and everything else
|
||||
GdP.setHgap(20);
|
||||
GdP.setVgap(20);
|
||||
GdP.setPadding(new Insets(40,20,20,40));
|
||||
ColumnConstraints col_1 = new ColumnConstraints();
|
||||
col_1.setPercentWidth(33);
|
||||
ColumnConstraints col_2 = new ColumnConstraints();
|
||||
|
Reference in New Issue
Block a user