aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorsowgro <tpoke.ferrari@gmail.com>2023-05-12 02:03:30 -0400
committersowgro <tpoke.ferrari@gmail.com>2023-05-12 02:03:30 -0400
commit7f4070564af6cc9ba1eb79f3730eb0213eea3b11 (patch)
tree3e3b65e3335c973bc8c1f05827237146c0a2e649 /src/main
parentad89ab07efd535dc0df280e982139db774558503 (diff)
downloadNPEhero-7f4070564af6cc9ba1eb79f3730eb0213eea3b11.tar.gz
NPEhero-7f4070564af6cc9ba1eb79f3730eb0213eea3b11.tar.bz2
NPEhero-7f4070564af6cc9ba1eb79f3730eb0213eea3b11.zip
big gui stuff
Diffstat (limited to 'src/main')
-rw-r--r--src/main/JFXaudioPlayer.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/main/JFXaudioPlayer.java b/src/main/JFXaudioPlayer.java
new file mode 100644
index 0000000..0a2162d
--- /dev/null
+++ b/src/main/JFXaudioPlayer.java
@@ -0,0 +1,16 @@
+package main;
+
+import java.io.File;
+import javafx.scene.media.Media;
+import javafx.scene.media.MediaPlayer;
+
+public class JFXaudioPlayer {
+ public static void main(String[] args)
+ {
+ String musicFile = "EXAMPLE.mp3"; // For example
+ Media sound = new Media(new File(musicFile).toURI().toString());
+ MediaPlayer mediaPlayer = new MediaPlayer(sound);
+ mediaPlayer.play();
+ mediaPlayer.stop();
+ }
+} \ No newline at end of file