Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.example</groupId>
- <artifactId>Fuck</artifactId>
- <version>1.0-SNAPSHOT</version>
- <properties>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <maven.compiler.release>11</maven.compiler.release>
- </properties>
- <dependencies>
- <dependency>
- <groupId>org.openjfx</groupId>
- <artifactId>javafx-controls</artifactId>
- <version>11</version>
- </dependency>
- <dependency>
- <groupId>org.openjfx</groupId>
- <artifactId>javafx-fxml</artifactId>
- <version>11</version>
- </dependency>
- </dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>3.8.1</version>
- <configuration>
- <release>${maven.compiler.release}</release>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.openjfx</groupId>
- <artifactId>javafx-maven-plugin</artifactId>
- <version>0.0.3</version>
- <configuration>
- <mainClass>org.example.App</mainClass>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </project>
- import javafx.application.Application;
- import javafx.fxml.FXMLLoader;
- import javafx.scene.Parent;
- import javafx.scene.Scene;
- import javafx.stage.Stage;
- import java.io.IOException;
- /**
- * JavaFX App
- */
- public class App extends Application {
- @Override
- public void start(Stage stage) throws IOException {
- Scene scene = new Scene(loadFXML());
- stage.setScene(scene);
- stage.show();
- }
- private static Parent loadFXML() throws IOException {
- FXMLLoader fxmlLoader = new FXMLLoader(App.class.getResource("primary.fxml"));
- return fxmlLoader.load();
- }
- public static void main(String[] args) {
- launch();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment