Setup GUI libraries

pull/35/head
James Ball 2020-11-22 14:39:38 +00:00
rodzic 6718bb17d3
commit 2cffb5d02b
13 zmienionych plików z 39 dodań i 1 usunięć

Wyświetl plik

@ -7,7 +7,7 @@
<sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/win32-x64" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="jdk" jdkName="15" jdkType="JavaSDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="lib" level="project" />
<orderEntry type="module-library" scope="TEST">

BIN
lib/javafx-swt.jar 100644

Plik binarny nie jest wyświetlany.

BIN
lib/javafx.base.jar 100644

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

BIN
lib/javafx.fxml.jar 100644

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Wyświetl plik

@ -0,0 +1,3 @@
javafx.version=15.0.1
javafx.runtime.version=15.0.1+1
javafx.runtime.build=1

Plik binarny nie jest wyświetlany.

BIN
lib/javafx.web.jar 100644

Plik binarny nie jest wyświetlany.

Wyświetl plik

@ -0,0 +1,4 @@
package gui;
public class Controller {
}

23
src/gui/Main.java 100644
Wyświetl plik

@ -0,0 +1,23 @@
package gui;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;
public class Main extends Application {
@Override
public void start(Stage primaryStage) throws Exception{
Parent root = FXMLLoader.load(getClass().getResource("sample.fxml"));
primaryStage.setTitle("Hello World");
primaryStage.setScene(new Scene(root, 300, 275));
primaryStage.show();
}
public static void main(String[] args) {
launch(args);
}
}

Wyświetl plik

@ -0,0 +1,8 @@
<?import javafx.geometry.Insets?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<GridPane fx:controller="gui.Controller"
xmlns:fx="http://javafx.com/fxml" alignment="center" hgap="10" vgap="10">
</GridPane>