Class SettingsPanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class SettingsPanel extends JPanel
Simple settings UI panel that allows editing small application preferences persisted to `app_settings.properties` in the application working directory. The panel currently supports the database path and a theme selection.
See Also:
  • Field Details

    • databasePathField

      private JTextField databasePathField
      Input field for the database path.
    • themeSelector

      private JComboBox<String> themeSelector
      Selector for choosing the application theme.
    • settings

      private Properties settings
      In-memory settings loaded from `app_settings.properties`.
    • SETTINGS_FILE

      private static final String SETTINGS_FILE
      Filename where application settings are persisted.
      See Also:
  • Constructor Details

    • SettingsPanel

      public SettingsPanel()
      Create the settings panel and load persisted values.
  • Method Details

    • loadSettings

      private void loadSettings()
      Load settings from the properties file. Missing file is treated as defaults.
    • saveSettings

      private void saveSettings(ActionEvent event)
      Persist the current values to the properties file.
      Parameters:
      event - action event from the Save button