Guest User

Untitled

a guest
Jun 9th, 2020
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 2.34 KB | None | 0 0
  1. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  2.   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  3.     <modelVersion>4.0.0</modelVersion>
  4.     <groupId>org.example</groupId>
  5.     <artifactId>Fuck</artifactId>
  6.     <version>1.0-SNAPSHOT</version>
  7.  
  8.     <properties>
  9.         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  10.         <maven.compiler.release>11</maven.compiler.release>
  11.     </properties>
  12.  
  13.     <dependencies>
  14.         <dependency>
  15.             <groupId>org.openjfx</groupId>
  16.             <artifactId>javafx-controls</artifactId>
  17.             <version>11</version>
  18.         </dependency>
  19.  
  20.         <dependency>
  21.             <groupId>org.openjfx</groupId>
  22.             <artifactId>javafx-fxml</artifactId>
  23.             <version>11</version>
  24.         </dependency>
  25.     </dependencies>
  26.  
  27.     <build>
  28.         <plugins>
  29.             <plugin>
  30.                 <groupId>org.apache.maven.plugins</groupId>
  31.                 <artifactId>maven-compiler-plugin</artifactId>
  32.                 <version>3.8.1</version>
  33.                 <configuration>
  34.                     <release>${maven.compiler.release}</release>
  35.                 </configuration>
  36.             </plugin>
  37.  
  38.             <plugin>
  39.                 <groupId>org.openjfx</groupId>
  40.                 <artifactId>javafx-maven-plugin</artifactId>
  41.                 <version>0.0.3</version>
  42.                 <configuration>
  43.                     <mainClass>org.example.App</mainClass>
  44.                 </configuration>
  45.             </plugin>
  46.  
  47.         </plugins>
  48.     </build>
  49.  
  50. </project>
  51.  
  52.  
  53.  
  54.  
  55. import javafx.application.Application;
  56. import javafx.fxml.FXMLLoader;
  57. import javafx.scene.Parent;
  58. import javafx.scene.Scene;
  59. import javafx.stage.Stage;
  60.  
  61. import java.io.IOException;
  62.  
  63. /**
  64.  * JavaFX App
  65.  */
  66. public class App extends Application {
  67.  
  68.     @Override
  69.     public void start(Stage stage) throws IOException {
  70.         Scene scene = new Scene(loadFXML());
  71.         stage.setScene(scene);
  72.         stage.show();
  73.     }
  74.  
  75.     private static Parent loadFXML() throws IOException {
  76.         FXMLLoader fxmlLoader = new FXMLLoader(App.class.getResource("primary.fxml"));
  77.         return fxmlLoader.load();
  78.     }
  79.  
  80.     public static void main(String[] args) {
  81.         launch();
  82.     }
  83.  
  84. }
Advertisement
Add Comment
Please, Sign In to add comment