From 84ef451eb91159379f73df76b5d293d6e4e7b1e6 Mon Sep 17 00:00:00 2001 From: Nathan M Date: Mon, 27 Feb 2023 08:49:02 -0500 Subject: [PATCH] Implement option json --- jApps/src/components/Options.java | 5 +++++ jApps/src/components/appConfig.java | 16 ++++++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/jApps/src/components/Options.java b/jApps/src/components/Options.java index 3f787a0..247ff5b 100644 --- a/jApps/src/components/Options.java +++ b/jApps/src/components/Options.java @@ -84,6 +84,11 @@ public ApplyListener(JButton button) { // Called when Apply button is pressed public void actionPerformed(ActionEvent e) { System.out.println("apply clicked"); + + appConfig.LOOK_AND_FEEL = lookAndFeelInput.getText(); + appConfig.INSTALL_DIRECTORY = installLocInput.getText(); + appConfig.APP_NAME = appNameInput.getText(); + jApps.updateConfigJson(); } } diff --git a/jApps/src/components/appConfig.java b/jApps/src/components/appConfig.java index 6c1e184..e012865 100644 --- a/jApps/src/components/appConfig.java +++ b/jApps/src/components/appConfig.java @@ -11,14 +11,14 @@ public class appConfig { - public static final String INSTALL_DIRECTORY; - public static final String USB_NAME; - public static final String USB_DETECTOR_NAME; - public static final String LOOK_AND_FEEL; - public static final String APP_NAME; - public static final String APPS_CONFIG; - public static final String GENERAL_CONFIG = "generalConfig.json"; - public static final String TEMP_ZIP_NAME; + public static String INSTALL_DIRECTORY; + public static String USB_NAME; + public static String USB_DETECTOR_NAME; + public static String LOOK_AND_FEEL; + public static String APP_NAME; + public static String APPS_CONFIG; + public static String GENERAL_CONFIG = "generalConfig.json"; + public static String TEMP_ZIP_NAME; // Static initilizer that loads from a json static {