From a027bd591e38543da408c71a6d1d07576f6a8203 Mon Sep 17 00:00:00 2001 From: esoe Date: Mon, 26 Sep 2022 17:15:33 +0300 Subject: [PATCH] qq --- src/main/java/module-info.java | 4 +- src/main/java/ru/molokoin/App.java | 10 ++--- .../java/ru/molokoin/MainFrameController.java | 3 +- src/main/resources/face/mainframe.fxml | 5 ++- src/main/resources/face/styles.css | 37 +++++++++--------- target/classes/face/mainframe.fxml | 5 ++- target/classes/face/styles.css | 37 +++++++++--------- target/classes/module-info.class | Bin 223 -> 223 bytes target/classes/ru/molokoin/App.class | Bin 1728 -> 2002 bytes .../ru/molokoin/MainFrameController.class | Bin 1491 -> 1558 bytes .../compile/default-compile/createdFiles.lst | 0 .../compile/default-compile/inputFiles.lst | 5 --- target/test-classes/ru/molokoin/AppTest.class | Bin 596 -> 0 bytes 13 files changed, 51 insertions(+), 55 deletions(-) delete mode 100644 target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst delete mode 100644 target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst delete mode 100644 target/test-classes/ru/molokoin/AppTest.class diff --git a/src/main/java/module-info.java b/src/main/java/module-info.java index 67791b1..2f81eec 100644 --- a/src/main/java/module-info.java +++ b/src/main/java/module-info.java @@ -1,5 +1,5 @@ module ru.molokoin { - requires javafx.controls; - requires javafx.fxml; + requires transitive javafx.controls; + requires transitive javafx.fxml; exports ru.molokoin; } diff --git a/src/main/java/ru/molokoin/App.java b/src/main/java/ru/molokoin/App.java index 05ae830..a061a18 100644 --- a/src/main/java/ru/molokoin/App.java +++ b/src/main/java/ru/molokoin/App.java @@ -1,7 +1,5 @@ package ru.molokoin; -import java.net.URL; - import javafx.application.Application; import javafx.fxml.FXMLLoader; //import javafx.fxml.*; @@ -18,12 +16,14 @@ public class App extends Application { @Override public void start(Stage stage){ try { - String link = "/face/mainframe.fxml"; - Parent root = FXMLLoader.load(getClass().getResource(link)); - //root.getStylesheets().add(getClass().getResource("/face/styles.css").toExternalForm()); + String linkFXML = "/face/mainframe.fxml"; + String linkCSS = "/face/styles.css"; + + Parent root = FXMLLoader.load(getClass().getResource(linkFXML)); Scene scene = new Scene(root); stage.setTitle("exchange-server-settings"); stage.setScene(scene); + scene.getStylesheets().add(getClass().getResource(linkCSS).toExternalForm()); stage.show(); } catch (Exception e) { System.out.println("Не удалось запустить сцену. Ошибка: " + e); diff --git a/src/main/java/ru/molokoin/MainFrameController.java b/src/main/java/ru/molokoin/MainFrameController.java index 772e5c5..f10b37d 100644 --- a/src/main/java/ru/molokoin/MainFrameController.java +++ b/src/main/java/ru/molokoin/MainFrameController.java @@ -8,11 +8,12 @@ import javafx.fxml.FXML; import javafx.fxml.Initializable; import javafx.scene.control.Button; import javafx.scene.control.TextField; -import javafx.scene.input.MouseEvent; public class MainFrameController implements Initializable{ @FXML public Button btn; + @FXML + public TextField portField; public ExchangeServer server; @Override diff --git a/src/main/resources/face/mainframe.fxml b/src/main/resources/face/mainframe.fxml index e3dfbd7..df04c83 100644 --- a/src/main/resources/face/mainframe.fxml +++ b/src/main/resources/face/mainframe.fxml @@ -5,13 +5,14 @@ + -