From 2b5af885c9c270f15a86b9ebcb3388bbfee61b39 Mon Sep 17 00:00:00 2001 From: Matin Date: Fri, 29 May 2026 21:05:35 +0430 Subject: [PATCH] I created the basic UI of the music player. --- .idea/vcs.xml | 7 ++ src/main/java/sbu/javafx/Launcher.java | 10 ++- src/main/java/sbu/javafx/MusicApp.java | 1 + src/main/java/sbu/javafx/MusicController.java | 6 ++ src/main/resources/sbu/javafx/App-view.fxml | 83 ++++++++++++++++++- 5 files changed, 103 insertions(+), 4 deletions(-) create mode 100644 .idea/vcs.xml diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..8306744 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/src/main/java/sbu/javafx/Launcher.java b/src/main/java/sbu/javafx/Launcher.java index c288d10..2a7323a 100644 --- a/src/main/java/sbu/javafx/Launcher.java +++ b/src/main/java/sbu/javafx/Launcher.java @@ -2,7 +2,13 @@ package sbu.javafx; import javafx.application.Application; -public class Launcher{ +public class Launcher { + public static void main(String[] args) { - // TODO: Launch the JavaFX application by calling Application.launch(Main.class) } + + Application.launch(MusicApp.class ,args); + + + } } + diff --git a/src/main/java/sbu/javafx/MusicApp.java b/src/main/java/sbu/javafx/MusicApp.java index a50badc..fd7b85b 100644 --- a/src/main/java/sbu/javafx/MusicApp.java +++ b/src/main/java/sbu/javafx/MusicApp.java @@ -16,6 +16,7 @@ public class MusicApp extends Application { Scene scene = new Scene(fxmlLoader.load()); stage.setTitle("Music Player"); stage.setScene(scene); + //TODO: add icon to the stage stage.show(); } diff --git a/src/main/java/sbu/javafx/MusicController.java b/src/main/java/sbu/javafx/MusicController.java index 5da27a9..d21cb5a 100644 --- a/src/main/java/sbu/javafx/MusicController.java +++ b/src/main/java/sbu/javafx/MusicController.java @@ -2,6 +2,7 @@ package sbu.javafx; import javafx.fxml.FXML; import javafx.event.ActionEvent; +import javafx.scene.control.Button; import javafx.scene.control.Label; import javafx.scene.input.MouseEvent; import javafx.scene.layout.VBox; @@ -12,6 +13,11 @@ public class MusicController { //TODO: Implement the logic to play a song. This method should update the UI to show which song is currently playing. + public Button button ; + public void OnAction() + { + System.out.println("click on submit"); + } @FXML public void handlePlayAction() { //Update labels, change button icons, etc. diff --git a/src/main/resources/sbu/javafx/App-view.fxml b/src/main/resources/sbu/javafx/App-view.fxml index 306c8d3..acd892b 100644 --- a/src/main/resources/sbu/javafx/App-view.fxml +++ b/src/main/resources/sbu/javafx/App-view.fxml @@ -1,8 +1,87 @@ + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -