diff --git a/pom.xml b/pom.xml
index 6435289..c55980d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,27 +1,27 @@
-
- 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">
- com.lestarieragemilang
- app
- 1.0-SNAPSHOT
+ 4.0.0
-
- UTF-8
+ com.lestarieragemilang
+ app
+ 1.0-SNAPSHOT
- 17
- 17
+
+ UTF-8
- ${env.GRAALVM_HOME}
+ 17
+ 17
- com.lestarieragemilang.App
+ ${env.GRAALVM_HOME}
- 21
-
+ com.lestarieragemilang.App
-
+ 22
+
+
+
macos
@@ -66,76 +66,76 @@
-
-
-
-
- org.openjfx
- javafx-controls
- ${javafx.version}
-
-
-
- org.openjfx
- javafx-controls
- ${javafx.version}
- win
-
-
-
-
-
-
- org.openjfx
- javafx-fxml
- ${javafx.version}
-
-
-
- org.openjfx
- javafx-fxml
- ${javafx.version}
- win
-
-
-
-
-
-
- org.openjfx
- javafx-base
- ${javafx.version}
-
-
-
- org.openjfx
- javafx-base
- ${javafx.version}
- win
-
-
-
-
-
-
- org.openjfx
- javafx-graphics
- ${javafx.version}
-
-
-
- org.openjfx
- javafx-graphics
- ${javafx.version}
- win
-
-
-
-
-
-
-
-
+
+
+
+
+ org.openjfx
+ javafx-controls
+ ${javafx.version}
+
+
+
+ org.openjfx
+ javafx-controls
+ ${javafx.version}
+ win
+
+
+
+
+
+
+ org.openjfx
+ javafx-fxml
+ ${javafx.version}
+
+
+
+ org.openjfx
+ javafx-fxml
+ ${javafx.version}
+ win
+
+
+
+
+
+
+ org.openjfx
+ javafx-base
+ ${javafx.version}
+
+
+
+ org.openjfx
+ javafx-base
+ ${javafx.version}
+ win
+
+
+
+
+
+
+ org.openjfx
+ javafx-graphics
+ ${javafx.version}
+
+
+
+ org.openjfx
+ javafx-graphics
+ ${javafx.version}
+ win
+
+
+
+
+
+
+
+
org.jfxtras
jmetro
11.6.16
@@ -155,46 +155,53 @@
-
-
- org.openjfx
- javafx-fxml
-
-
-
-
- org.openjfx
- javafx-base
-
-
-
-
- org.openjfx
- javafx-graphics
-
-
-
-
- com.mysql
- mysql-connector-j
- 8.3.0
-
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-compiler-plugin
- 3.8.1
-
- ${maven.compiler.target}
-
-
-
-
-
+
+
+ org.openjfx
+ javafx-fxml
+
+
+
+
+ org.openjfx
+ javafx-base
+
+
+
+
+ org.openjfx
+ javafx-graphics
+
+
+
+
+ com.mysql
+ mysql-connector-j
+ 8.3.0
+
+
+
+
+ io.github.palexdev
+ materialfx
+ 11.17.0
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.8.1
+
+ ${maven.compiler.target}
+
+
+
+
+
org.codehaus.mojo
flatten-maven-plugin
1.6.0
@@ -221,7 +228,7 @@
-
+
org.gaul
modernizer-maven-plugin
2.7.0
@@ -238,27 +245,27 @@
-
- org.openjfx
- javafx-maven-plugin
- 0.0.8
-
- ${java.home}/bin/java.exe
-
-
-
-
-
- default-cli
-
- ${main.class}
-
-
-
-
-
-
-
+
+ org.openjfx
+ javafx-maven-plugin
+ 0.0.8
+
+ ${java.home}/bin/java.exe
+
+
+
+
+
+ default-cli
+
+ ${main.class}
+
+
+
+
+
+
+
com.gluonhq
gluonfx-maven-plugin
1.0.22
@@ -273,7 +280,7 @@
-
+
org.codehaus.mojo
exec-maven-plugin
3.2.0
@@ -281,17 +288,18 @@
${main.class}
${java.home}/bin/java.exe
- -agentlib:native-image-agent=access-filter-file=${project.basedir}/src/main/resources/META-INF/native-image/filter-file.json,config-merge-dir=${project.basedir}/src/main/resources/META-INF/native-image
+
+ -agentlib:native-image-agent=access-filter-file=${project.basedir}/src/main/resources/META-INF/native-image/filter-file.json,config-merge-dir=${project.basedir}/src/main/resources/META-INF/native-image
-classpath
${main.class}
-
+
-
+
maven-resources-plugin
@@ -305,5 +313,5 @@
-
-
+
+
\ No newline at end of file
diff --git a/src/main/java/com/lestarieragemilang/App.java b/src/main/java/com/lestarieragemilang/App.java
index 8f84ea6..74fcaec 100644
--- a/src/main/java/com/lestarieragemilang/App.java
+++ b/src/main/java/com/lestarieragemilang/App.java
@@ -8,6 +8,7 @@
import javafx.stage.StageStyle;
import java.io.IOException;
+import java.net.URL;
/**
* JavaFX App
@@ -15,10 +16,11 @@
public class App extends Application {
private static Scene scene;
+ private static final String LOGIN_FXML = "login";
@Override
public void start(Stage stage) throws IOException {
- scene = new Scene(loadFXML("login"), 1200, 650);
+ scene = new Scene(loadFXML(LOGIN_FXML), 1200, 650);
scene.getStylesheets().add(getClass().getResource("style.css").toExternalForm());
stage.initStyle(StageStyle.UNDECORATED);
stage.setScene(scene);
@@ -41,7 +43,11 @@ public void start(Stage stage) throws IOException {
}
static void setRoot(String fxml) throws IOException {
- scene.setRoot(loadFXML(fxml));
+ if (fxmlExists(fxml)) {
+ scene.setRoot(loadFXML(fxml));
+ } else {
+ throw new IOException("FXML file does not exist: " + fxml);
+ }
}
private static Parent loadFXML(String fxml) throws IOException {
@@ -49,6 +55,11 @@ private static Parent loadFXML(String fxml) throws IOException {
return fxmlLoader.load();
}
+ private static boolean fxmlExists(String fxml) {
+ URL resource = App.class.getResource(fxml + ".fxml");
+ return resource != null;
+ }
+
public static void main(String[] args) {
launch();
}
diff --git a/src/main/java/com/lestarieragemilang/Login.java b/src/main/java/com/lestarieragemilang/Login.java
index 1151266..d8e9c94 100644
--- a/src/main/java/com/lestarieragemilang/Login.java
+++ b/src/main/java/com/lestarieragemilang/Login.java
@@ -5,7 +5,6 @@
import javafx.fxml.FXML;
import javafx.scene.control.Alert;
-import javafx.scene.control.Button;
import javafx.scene.control.TextField;
import javafx.scene.control.ButtonType;
import javafx.scene.control.PasswordField;
@@ -17,40 +16,37 @@
public class Login extends AuthRepositories {
- @FXML
- private AnchorPane anchorPane;
+ @FXML
+ private AnchorPane anchorPane;
- @FXML
- TextField username;
+ @FXML
+ TextField username;
- @FXML
- PasswordField password;
+ @FXML
+ PasswordField password;
- @FXML
- Button loginButton;
-
- @FXML
- private void btnMasuk() throws IOException {
- boolean validation = loginRepo(
+ @FXML
+ private void btnMasuk() throws IOException {
+ boolean validation = loginRepo(
username.getText(), password.getText());
- if (validation) {
- Redirect.page("dashboard", anchorPane, getClass());
- } else {
- Alert confirmationDialog = new Alert(Alert.AlertType.ERROR);
- confirmationDialog.getDialogPane().setPrefSize(450, 250);
+ if (validation) {
+ Redirect.page("dashboard", anchorPane, getClass());
+ } else {
+ Alert confirmationDialog = new Alert(Alert.AlertType.ERROR);
+ confirmationDialog.getDialogPane().setPrefSize(450, 250);
- confirmationDialog.setTitle("Login Gagal");
- confirmationDialog.setHeaderText("Username Atau Password Anda Salah !!!...");
-
- confirmationDialog.getButtonTypes().setAll(ButtonType.YES);
- confirmationDialog.showAndWait();
- }
+ confirmationDialog.setTitle("Login Gagal");
+ confirmationDialog.setHeaderText("Username Atau Password Anda Salah !!!...");
+ confirmationDialog.getButtonTypes().setAll(ButtonType.YES);
+ confirmationDialog.showAndWait();
}
- @FXML
- private void btnKeluar() {
- System.exit(0);
- }
+ }
+
+ @FXML
+ private void btnKeluar() {
+ System.exit(0);
+ }
}
\ No newline at end of file
diff --git a/src/main/java/module-info.java b/src/main/java/module-info.java
index bd678ca..c3fe1bc 100644
--- a/src/main/java/module-info.java
+++ b/src/main/java/module-info.java
@@ -3,6 +3,7 @@
requires javafx.fxml;
requires java.sql;
requires java.desktop;
+ requires transitive javafx.graphics;
opens com.lestarieragemilang to javafx.fxml;
opens com.lestarieragemilang.Entities to javafx.base;
diff --git a/src/main/resources/com/lestarieragemilang/Assets/Images/photo_6240183307941821544_x.jpg b/src/main/resources/com/lestarieragemilang/Assets/Images/photo_6240183307941821544_x.jpg
new file mode 100644
index 0000000..c0d2333
Binary files /dev/null and b/src/main/resources/com/lestarieragemilang/Assets/Images/photo_6240183307941821544_x.jpg differ
diff --git a/src/main/resources/com/lestarieragemilang/Assets/Images/photo_6240183307941821545_x.jpg b/src/main/resources/com/lestarieragemilang/Assets/Images/photo_6240183307941821545_x.jpg
new file mode 100644
index 0000000..96a2c8f
Binary files /dev/null and b/src/main/resources/com/lestarieragemilang/Assets/Images/photo_6240183307941821545_x.jpg differ
diff --git a/src/main/resources/com/lestarieragemilang/laporan.fxml b/src/main/resources/com/lestarieragemilang/laporan.fxml
index f36bf3e..8e98dad 100644
--- a/src/main/resources/com/lestarieragemilang/laporan.fxml
+++ b/src/main/resources/com/lestarieragemilang/laporan.fxml
@@ -11,59 +11,43 @@
-
+
-
-
\ No newline at end of file
+
diff --git a/src/main/resources/com/lestarieragemilang/login.fxml b/src/main/resources/com/lestarieragemilang/login.fxml
index 4cdc8a8..b2108cc 100644
--- a/src/main/resources/com/lestarieragemilang/login.fxml
+++ b/src/main/resources/com/lestarieragemilang/login.fxml
@@ -33,7 +33,7 @@
-
+
@@ -49,12 +49,14 @@
-
-
-
-
+
+
+
+
+
+
@@ -206,15 +208,17 @@
+
+
+
+
+
-
-
-
diff --git a/src/main/resources/com/lestarieragemilang/style.css b/src/main/resources/com/lestarieragemilang/style.css
index b665d4e..33a46d7 100644
--- a/src/main/resources/com/lestarieragemilang/style.css
+++ b/src/main/resources/com/lestarieragemilang/style.css
@@ -1,14 +1,12 @@
/* JavaFX CSS */
.navText {
- /* make hover */
-fx-background-color: #efefef;
-fx-text-fill: #0b1215;
-fx-font-size: 18px;
}
.navText:hover {
- /* make hover */
-fx-background-color: #111111;
-fx-text-fill: white;
}
@@ -23,4 +21,4 @@
-fx-background-color: white;
-fx-text-fill: #0b1215;
-fx-background-radius: 10px;
-}
+}
\ No newline at end of file
diff --git a/target/classes/com/lestarieragemilang/App.class b/target/classes/com/lestarieragemilang/App.class
index 2f596e8..6b68fa7 100644
Binary files a/target/classes/com/lestarieragemilang/App.class and b/target/classes/com/lestarieragemilang/App.class differ
diff --git a/target/classes/com/lestarieragemilang/Assets/Images/photo_6240183307941821544_x.jpg b/target/classes/com/lestarieragemilang/Assets/Images/photo_6240183307941821544_x.jpg
new file mode 100644
index 0000000..c0d2333
Binary files /dev/null and b/target/classes/com/lestarieragemilang/Assets/Images/photo_6240183307941821544_x.jpg differ
diff --git a/target/classes/com/lestarieragemilang/Assets/Images/photo_6240183307941821545_x.jpg b/target/classes/com/lestarieragemilang/Assets/Images/photo_6240183307941821545_x.jpg
new file mode 100644
index 0000000..96a2c8f
Binary files /dev/null and b/target/classes/com/lestarieragemilang/Assets/Images/photo_6240183307941821545_x.jpg differ
diff --git a/target/classes/com/lestarieragemilang/Login.class b/target/classes/com/lestarieragemilang/Login.class
index 874272b..154ed78 100644
Binary files a/target/classes/com/lestarieragemilang/Login.class and b/target/classes/com/lestarieragemilang/Login.class differ
diff --git a/target/classes/com/lestarieragemilang/laporan.fxml b/target/classes/com/lestarieragemilang/laporan.fxml
index f36bf3e..8e98dad 100644
--- a/target/classes/com/lestarieragemilang/laporan.fxml
+++ b/target/classes/com/lestarieragemilang/laporan.fxml
@@ -11,59 +11,43 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -75,21 +59,16 @@
-
+
-
+
-
+
@@ -99,4 +78,4 @@
-
\ No newline at end of file
+
diff --git a/target/classes/com/lestarieragemilang/login.fxml b/target/classes/com/lestarieragemilang/login.fxml
index 4cdc8a8..b2108cc 100644
--- a/target/classes/com/lestarieragemilang/login.fxml
+++ b/target/classes/com/lestarieragemilang/login.fxml
@@ -33,7 +33,7 @@
-
+
@@ -49,12 +49,14 @@
-
-
-
-
+
+
+
+
+
+
@@ -206,15 +208,17 @@
+
+
+
+
+
-
-
-
diff --git a/target/classes/com/lestarieragemilang/style.css b/target/classes/com/lestarieragemilang/style.css
index b665d4e..33a46d7 100644
--- a/target/classes/com/lestarieragemilang/style.css
+++ b/target/classes/com/lestarieragemilang/style.css
@@ -1,14 +1,12 @@
/* JavaFX CSS */
.navText {
- /* make hover */
-fx-background-color: #efefef;
-fx-text-fill: #0b1215;
-fx-font-size: 18px;
}
.navText:hover {
- /* make hover */
-fx-background-color: #111111;
-fx-text-fill: white;
}
@@ -23,4 +21,4 @@
-fx-background-color: white;
-fx-text-fill: #0b1215;
-fx-background-radius: 10px;
-}
+}
\ No newline at end of file
diff --git a/target/classes/module-info.class b/target/classes/module-info.class
index 61234b7..8fe00f7 100644
Binary files a/target/classes/module-info.class and b/target/classes/module-info.class differ