Initial Commit
This commit is contained in:
commit
bf4bac33a9
23
src/application/Main.java
Normal file
23
src/application/Main.java
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
package application;
|
||||||
|
|
||||||
|
import javafx.application.Application;
|
||||||
|
import javafx.stage.Stage;
|
||||||
|
import javafx.scene.Scene;
|
||||||
|
|
||||||
|
public class Main extends Application {
|
||||||
|
public void start(Stage primaryStage) {
|
||||||
|
try {
|
||||||
|
RootGridPane root = new RootGridPane();
|
||||||
|
Scene scene = new Scene(root, 400, 400);
|
||||||
|
primaryStage.setScene(scene);
|
||||||
|
primaryStage.show();
|
||||||
|
primaryStage.setTitle("Erstes Fenster");
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
launch(args);
|
||||||
|
}
|
||||||
|
}
|
31
src/application/RootGridPane.java
Normal file
31
src/application/RootGridPane.java
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
package application;
|
||||||
|
|
||||||
|
import javafx.scene.control.Button;
|
||||||
|
import javafx.scene.layout.GridPane;
|
||||||
|
|
||||||
|
public class RootGridPane extends GridPane {
|
||||||
|
|
||||||
|
Button btButton1, btLaden, btSpeichern; // Main Buttons
|
||||||
|
Button btButton4, btButton5, btButton6, btButtonSieben, btButtonAcht; // FlowPane
|
||||||
|
|
||||||
|
public RootGridPane() {
|
||||||
|
initComponents();
|
||||||
|
addComponents();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void initComponents() {
|
||||||
|
btButton1 = new Button("Button1");
|
||||||
|
btButton1.setPrefSize(200, 200);
|
||||||
|
btLaden = new Button("Laden-Button");
|
||||||
|
btLaden.setPrefSize(200, 200);
|
||||||
|
btSpeichern = new Button("Speichern-Button");
|
||||||
|
btSpeichern.setPrefSize(200, 200);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void addComponents() {
|
||||||
|
add(btButton1, 0, 0);
|
||||||
|
add(btSpeichern, 0, 1);
|
||||||
|
add(btLaden, 1, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user