From 14f452bbeb8baa3eb5f20a7b749db575797556d4 Mon Sep 17 00:00:00 2001 From: esoe Date: Mon, 26 Sep 2022 15:19:25 +0300 Subject: [PATCH] qq --- src/main/java/ru/molokoin/App.java | 8 +++--- .../java/ru/molokoin/MainFrameController.java | 5 ++-- src/main/resources/face/mainframe.fxml | 15 ++++++++--- src/main/resources/face/styles.css | 24 ++++++++++++++++++ target/classes/face/mainframe.fxml | 15 ++++++++--- target/classes/face/styles.css | 24 ++++++++++++++++++ target/classes/ru/molokoin/App.class | Bin 1679 -> 1728 bytes .../ru/molokoin/MainFrameController.class | Bin 1491 -> 1491 bytes 8 files changed, 77 insertions(+), 14 deletions(-) create mode 100644 src/main/resources/face/styles.css create mode 100644 target/classes/face/styles.css diff --git a/src/main/java/ru/molokoin/App.java b/src/main/java/ru/molokoin/App.java index d89a224..05ae830 100644 --- a/src/main/java/ru/molokoin/App.java +++ b/src/main/java/ru/molokoin/App.java @@ -20,18 +20,18 @@ public class App extends Application { try { String link = "/face/mainframe.fxml"; Parent root = FXMLLoader.load(getClass().getResource(link)); + //root.getStylesheets().add(getClass().getResource("/face/styles.css").toExternalForm()); + Scene scene = new Scene(root); stage.setTitle("exchange-server-settings"); - stage.setScene(new Scene(root)); + stage.setScene(scene); stage.show(); } catch (Exception e) { System.out.println("Не удалось запустить сцену. Ошибка: " + e); } - - } public static void main(String[] args) { launch(); } -} \ No newline at end of file +} diff --git a/src/main/java/ru/molokoin/MainFrameController.java b/src/main/java/ru/molokoin/MainFrameController.java index da2adca..772e5c5 100644 --- a/src/main/java/ru/molokoin/MainFrameController.java +++ b/src/main/java/ru/molokoin/MainFrameController.java @@ -7,6 +7,7 @@ import javafx.event.Event; 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{ @@ -20,7 +21,7 @@ public class MainFrameController implements Initializable{ System.out.println("Инициализация компонентов интерфейса ..."); server = new ExchangeServer(); } - + @FXML public void buttonClicked(Event e){ System.out.println("Button clicked"); @@ -32,6 +33,6 @@ public class MainFrameController implements Initializable{ btn.setText("START"); server.stop(); } - + } } diff --git a/src/main/resources/face/mainframe.fxml b/src/main/resources/face/mainframe.fxml index 3ac0079..e3dfbd7 100644 --- a/src/main/resources/face/mainframe.fxml +++ b/src/main/resources/face/mainframe.fxml @@ -1,10 +1,17 @@ + + - -