Index: /applications/editors/josm/plugins/flatlaf/src/org/openstreetmap/josm/plugins/flatlaf/FlatLaf.properties
===================================================================
--- /applications/editors/josm/plugins/flatlaf/src/org/openstreetmap/josm/plugins/flatlaf/FlatLaf.properties	(revision 35697)
+++ /applications/editors/josm/plugins/flatlaf/src/org/openstreetmap/josm/plugins/flatlaf/FlatLaf.properties	(revision 35698)
@@ -3,3 +3,5 @@
 #
 
+ComboBoxUI=org.openstreetmap.josm.plugins.flatlaf.JosmFlatComboBoxUI
 TabbedPaneUI=org.openstreetmap.josm.plugins.flatlaf.JosmFlatTabbedPaneUI
+TextFieldUI=org.openstreetmap.josm.plugins.flatlaf.JosmFlatTextFieldUI
Index: /applications/editors/josm/plugins/flatlaf/src/org/openstreetmap/josm/plugins/flatlaf/JosmFlatComboBoxUI.java
===================================================================
--- /applications/editors/josm/plugins/flatlaf/src/org/openstreetmap/josm/plugins/flatlaf/JosmFlatComboBoxUI.java	(revision 35698)
+++ /applications/editors/josm/plugins/flatlaf/src/org/openstreetmap/josm/plugins/flatlaf/JosmFlatComboBoxUI.java	(revision 35698)
@@ -0,0 +1,64 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.plugins.flatlaf;
+
+import java.awt.Color;
+import java.awt.Component;
+
+import javax.swing.BorderFactory;
+import javax.swing.ComboBoxEditor;
+import javax.swing.JComponent;
+import javax.swing.JTextField;
+import javax.swing.border.LineBorder;
+import javax.swing.plaf.ComponentUI;
+
+import org.openstreetmap.josm.gui.widgets.AbstractTextComponentValidator;
+
+import com.formdev.flatlaf.ui.FlatComboBoxUI;
+import com.formdev.flatlaf.ui.FlatTextBorder;
+
+/**
+ * Special JOSM UI delegate for JComboBox that changes a {@link LineBorder},
+ * set on the editor text field, into a FlatLaf outline.
+ * Also assigns background color set on editor text field to combo box.
+ * E.g. used by {@link AbstractTextComponentValidator}.
+ */
+public class JosmFlatComboBoxUI
+    extends FlatComboBoxUI
+{
+    public static ComponentUI createUI(JComponent c) {
+        return new JosmFlatComboBoxUI();
+    }
+
+    @Override
+    protected ComboBoxEditor createEditor() {
+        ComboBoxEditor comboBoxEditor = super.createEditor();
+
+        Component editor = comboBoxEditor.getEditorComponent();
+        if (editor instanceof JTextField) {
+            JTextField textField = (JTextField) editor;
+            editor.addPropertyChangeListener(e -> {
+                String propertyName = e.getPropertyName();
+                if ("border".equals(propertyName)) {
+                    Object newBorder = e.getNewValue();
+                    if (newBorder instanceof LineBorder) {
+                        // change LineBorder to FlatLaf outline
+                        Color borderColor = ((LineBorder)newBorder).getLineColor();
+                        comboBox.putClientProperty("JComponent.outline", borderColor);
+                        textField.setBorder(BorderFactory.createEmptyBorder());
+                    } else if (newBorder instanceof FlatTextBorder) {
+                        // change FlatTextBorder to empty border
+                        textField.setBorder(BorderFactory.createEmptyBorder());
+                    } else if (newBorder == null) {
+                        // clear FlatLaf outline
+                        comboBox.putClientProperty("JComponent.outline", null);
+                    }
+                } else if ("background".equals(propertyName)) {
+                    // assign background color set on editor text field to combo box
+                    comboBox.setBackground((Color) e.getNewValue());
+                }
+            });
+        }
+
+        return comboBoxEditor;
+    }
+}
Index: /applications/editors/josm/plugins/flatlaf/src/org/openstreetmap/josm/plugins/flatlaf/JosmFlatTextFieldUI.java
===================================================================
--- /applications/editors/josm/plugins/flatlaf/src/org/openstreetmap/josm/plugins/flatlaf/JosmFlatTextFieldUI.java	(revision 35698)
+++ /applications/editors/josm/plugins/flatlaf/src/org/openstreetmap/josm/plugins/flatlaf/JosmFlatTextFieldUI.java	(revision 35698)
@@ -0,0 +1,51 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.plugins.flatlaf;
+
+import java.awt.Color;
+import java.beans.PropertyChangeEvent;
+
+import javax.swing.JComboBox;
+import javax.swing.JComponent;
+import javax.swing.UIManager;
+import javax.swing.border.LineBorder;
+import javax.swing.plaf.ComponentUI;
+import javax.swing.text.JTextComponent;
+
+import org.openstreetmap.josm.gui.download.DownloadDialog;
+import org.openstreetmap.josm.gui.widgets.AbstractTextComponentValidator;
+
+import com.formdev.flatlaf.ui.FlatTextFieldUI;
+
+/**
+ * Special JOSM UI delegate for JTextField that changes a {@link LineBorder} into a FlatLaf outline.
+ * Line borders are used in several dialogs/components to indicate warnings/errors/etc.
+ * E.g. used by {@link AbstractTextComponentValidator} or {@link DownloadDialog}.
+ */
+public class JosmFlatTextFieldUI
+    extends FlatTextFieldUI
+{
+    public static ComponentUI createUI(JComponent c) {
+        return new JosmFlatTextFieldUI();
+    }
+
+    @Override
+    protected void propertyChange(PropertyChangeEvent e) {
+        super.propertyChange(e);
+
+        if ("border".equals(e.getPropertyName())) {
+            Object newBorder = e.getNewValue();
+            JTextComponent textField = getComponent();
+            if (!(textField.getParent() instanceof JComboBox)) {
+                if (newBorder instanceof LineBorder) {
+                    // change LineBorder to FlatLaf outline
+                    Color borderColor = ((LineBorder)newBorder).getLineColor();
+                    textField.putClientProperty("JComponent.outline", borderColor);
+                    textField.setBorder(UIManager.getBorder("TextField.border"));
+                } else if (newBorder == null) {
+                    // clear FlatLaf outline
+                    textField.putClientProperty("JComponent.outline", null);
+                }
+            }
+        }
+    }
+}
