docs: protected String getText() {
          String text = null;
  
          // Try to find a text component in the spinner
          JTextComponent textEditorComponent;
          if (spinner.getEditor() instanceof JTextComponent) {
              textEditorComponent = (JTextComponent) spinner.getEditor();
          } else if (spinner.getEditor() instanceof JSpinner.DefaultEditor) {
              textEditorComponent = ((JSpinner.DefaultEditor) spinner.getEditor()).getTextField();
          } else {
              LOGGER.error("No text component can be found in the spinner to get the text: " + spinner);
              textEditorComponent = null;
          }
  
          // Read text from text component
          if (textEditorComponent != null) {
              text = textEditorComponent.getText();
          }
  
          return text;
      }