Commit 87029b01 authored by Yonas Adiel's avatar Yonas Adiel

Add simple JavaFX application

parent d2ab2b8e
build
# Created by https://www.gitignore.io/api/java,gradle
# Edit at https://www.gitignore.io/?templates=java,gradle
### Java ###
# Compiled class file
*.class
# Log file
*.log
# BlueJ files
*.ctxt
# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
### Gradle ###
.gradle
.idea
build/
# Ignore Gradle GUI config
gradle-app.setting
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar
# Cache of project
.gradletasknamecache
# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
# gradle/wrapper/gradle-wrapper.properties
### Gradle Patch ###
**/build/
# End of https://www.gitignore.io/api/java,gradle
\ No newline at end of file
......@@ -4,9 +4,9 @@ plugins {
apply plugin: 'application'
mainClassName = 'Main'
mainClassName = 'com.avatarduel.AvatarDuel'
group 'org.example'
group 'com.avatarduel'
version '1.0-SNAPSHOT'
sourceCompatibility = 1.8
......
package com.avatarduel;
import javafx.application.Application;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.text.Text;
import javafx.stage.Stage;
public class AvatarDuel extends Application {
@Override
public void start(Stage stage) {
Text text = new Text();
text.setText("Avatar Duel!");
text.setX(50);
text.setY(50);
Group root = new Group();
root.getChildren().add(text);
Scene scene = new Scene(root, 1280, 720);
stage.setTitle("Avatar Duel");
stage.setScene(scene);
stage.show();
}
public static void main(String[] args) {
launch();
}
}
\ No newline at end of file
public class Main {
public static void main(String[] args) {
System.out.println("Hello World");
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment