Index: trunk/src/org/openstreetmap/josm/gui/dialogs/NotesDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/NotesDialog.java	(revision 17767)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/NotesDialog.java	(revision 17768)
@@ -53,4 +53,5 @@
 import org.openstreetmap.josm.gui.util.DocumentAdapter;
 import org.openstreetmap.josm.gui.widgets.DisableShortcutsOnFocusGainedTextField;
+import org.openstreetmap.josm.gui.widgets.FilterField;
 import org.openstreetmap.josm.gui.widgets.JosmTextField;
 import org.openstreetmap.josm.spi.preferences.Config;
@@ -233,4 +234,5 @@
     private JosmTextField setupFilter() {
         final JosmTextField f = new DisableShortcutsOnFocusGainedTextField();
+        FilterField.setSearchIcon(f);
         f.setToolTipText(tr("Note filter"));
         f.getDocument().addDocumentListener(DocumentAdapter.create(ignore -> {
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java	(revision 17767)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java	(revision 17768)
@@ -85,4 +85,5 @@
 import org.openstreetmap.josm.gui.widgets.CompileSearchTextDecorator;
 import org.openstreetmap.josm.gui.widgets.DisableShortcutsOnFocusGainedTextField;
+import org.openstreetmap.josm.gui.widgets.FilterField;
 import org.openstreetmap.josm.gui.widgets.JosmTextField;
 import org.openstreetmap.josm.gui.widgets.PopupMenuLauncher;
@@ -322,4 +323,5 @@
     private JosmTextField setupFilter() {
         final JosmTextField f = new DisableShortcutsOnFocusGainedTextField();
+        FilterField.setSearchIcon(f);
         f.setToolTipText(tr("Relation list filter"));
         final CompileSearchTextDecorator decorator = CompileSearchTextDecorator.decorate(f);
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java	(revision 17767)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java	(revision 17768)
@@ -107,4 +107,5 @@
 import org.openstreetmap.josm.gui.widgets.CompileSearchTextDecorator;
 import org.openstreetmap.josm.gui.widgets.DisableShortcutsOnFocusGainedTextField;
+import org.openstreetmap.josm.gui.widgets.FilterField;
 import org.openstreetmap.josm.gui.widgets.JosmTextField;
 import org.openstreetmap.josm.gui.widgets.PopupMenuLauncher;
@@ -544,4 +545,5 @@
     private JosmTextField setupFilter() {
         final JosmTextField f = new DisableShortcutsOnFocusGainedTextField();
+        FilterField.setSearchIcon(f);
         f.setToolTipText(tr("Tag filter"));
         final CompileSearchTextDecorator decorator = CompileSearchTextDecorator.decorate(f);
Index: trunk/src/org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreference.java	(revision 17767)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreference.java	(revision 17768)
@@ -27,5 +27,4 @@
 import javax.swing.JButton;
 import javax.swing.JFileChooser;
-import javax.swing.JLabel;
 import javax.swing.JMenu;
 import javax.swing.JOptionPane;
@@ -54,4 +53,5 @@
 import org.openstreetmap.josm.gui.util.GuiHelper;
 import org.openstreetmap.josm.gui.widgets.AbstractFileChooser;
+import org.openstreetmap.josm.gui.widgets.FilterField;
 import org.openstreetmap.josm.gui.widgets.JosmTextField;
 import org.openstreetmap.josm.spi.preferences.Config;
@@ -168,9 +168,6 @@
         final JPanel txtFilterPanel = new JPanel(new GridBagLayout());
         p.add(txtFilterPanel, GBC.eol().fill(GBC.HORIZONTAL));
-        txtFilter = new JosmTextField();
-        JLabel lbFilter = new JLabel(tr("Search:"));
-        lbFilter.setLabelFor(txtFilter);
-        txtFilterPanel.add(lbFilter, GBC.std().insets(0, 0, 5, 0));
-        txtFilterPanel.add(txtFilter, GBC.eol().fill(GBC.HORIZONTAL));
+        txtFilter = new FilterField();
+        txtFilterPanel.add(txtFilter, GBC.eol().insets(0, 0, 0, 5).fill(GBC.HORIZONTAL));
         txtFilter.getDocument().addDocumentListener(DocumentAdapter.create(ignore -> applyFilter()));
         readPreferences(Preferences.main());
Index: trunk/src/org/openstreetmap/josm/gui/preferences/display/ColorPreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/display/ColorPreference.java	(revision 17767)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/display/ColorPreference.java	(revision 17768)
@@ -373,5 +373,5 @@
         JPanel panel = new JPanel(new GridBagLayout());
         panel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
-        panel.add(colorFilter, GBC.eol().fill(HORIZONTAL));
+        panel.add(colorFilter, GBC.eol().insets(0, 0, 0, 5).fill(HORIZONTAL));
         JScrollPane scrollpane = new JScrollPane(colors);
         scrollpane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
Index: trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginPreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginPreference.java	(revision 17767)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginPreference.java	(revision 17768)
@@ -9,8 +9,6 @@
 import java.awt.BorderLayout;
 import java.awt.Component;
-import java.awt.GridBagConstraints;
 import java.awt.GridBagLayout;
 import java.awt.GridLayout;
-import java.awt.Insets;
 import java.awt.event.ActionEvent;
 import java.awt.event.ComponentAdapter;
@@ -28,5 +26,4 @@
 
 import javax.swing.AbstractAction;
-import javax.swing.BorderFactory;
 import javax.swing.ButtonGroup;
 import javax.swing.DefaultListModel;
@@ -167,37 +164,23 @@
     private JPanel buildSearchFieldPanel() {
         JPanel pnl = new JPanel(new GridBagLayout());
-        pnl.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
-        GridBagConstraints gc = new GridBagConstraints();
-
-        gc.anchor = GridBagConstraints.NORTHWEST;
-        gc.fill = HORIZONTAL;
-        gc.weightx = 0.0;
-        gc.insets = new Insets(0, 0, 0, 3);
         pnl.add(GBC.glue(0, 0));
 
-        gc.weightx = 1.0;
         ButtonGroup bg = new ButtonGroup();
         JPanel radios = new JPanel();
-        addRadioButton(bg, radios, new JRadioButton(trc("plugins", "All"), true), gc, PluginInstallation.ALL);
-        addRadioButton(bg, radios, new JRadioButton(trc("plugins", "Installed")), gc, PluginInstallation.INSTALLED);
-        addRadioButton(bg, radios, new JRadioButton(trc("plugins", "Available")), gc, PluginInstallation.AVAILABLE);
-        pnl.add(radios, gc);
-
-        gc.gridx = 0;
-        gc.weightx = 0.0;
-        pnl.add(new JLabel(tr("Search:")), gc);
-
-        gc.gridx = 1;
-        gc.weightx = 1.0;
+        addRadioButton(bg, radios, new JRadioButton(trc("plugins", "All"), true), PluginInstallation.ALL);
+        addRadioButton(bg, radios, new JRadioButton(trc("plugins", "Installed")), PluginInstallation.INSTALLED);
+        addRadioButton(bg, radios, new JRadioButton(trc("plugins", "Available")), PluginInstallation.AVAILABLE);
+        pnl.add(radios, GBC.eol().fill(HORIZONTAL));
+
         pnl.add(new FilterField().filter(expr -> {
             model.filterDisplayedPlugins(expr);
             pnlPluginPreferences.refreshView();
-        }), gc);
+        }), GBC.eol().insets(0, 0, 0, 5).fill(HORIZONTAL));
         return pnl;
     }
 
-    private void addRadioButton(ButtonGroup bg, JPanel pnl, JRadioButton rb, GridBagConstraints gc, PluginInstallation value) {
+    private void addRadioButton(ButtonGroup bg, JPanel pnl, JRadioButton rb, PluginInstallation value) {
         bg.add(rb);
-        pnl.add(rb, gc);
+        pnl.add(rb, GBC.std());
         rb.addActionListener(e -> {
             model.filterDisplayedPlugins(value);
Index: trunk/src/org/openstreetmap/josm/gui/preferences/projection/CodeSelectionPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/projection/CodeSelectionPanel.java	(revision 17767)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/projection/CodeSelectionPanel.java	(revision 17768)
@@ -23,4 +23,5 @@
 import org.openstreetmap.josm.gui.preferences.projection.CodeProjectionChoice.CodeComparator;
 import org.openstreetmap.josm.gui.util.TableHelper;
+import org.openstreetmap.josm.gui.widgets.FilterField;
 import org.openstreetmap.josm.gui.widgets.JosmTextField;
 import org.openstreetmap.josm.tools.GBC;
@@ -32,5 +33,5 @@
 public class CodeSelectionPanel extends JPanel implements ListSelectionListener, DocumentListener {
 
-    private final JosmTextField filter = new JosmTextField(30);
+    private final JosmTextField filter = new FilterField();
     private final ProjectionCodeModel model = new ProjectionCodeModel();
     private JTable table;
@@ -104,5 +105,5 @@
 
         this.setLayout(new GridBagLayout());
-        this.add(filter, GBC.eol().weight(1.0, 0.0));
+        this.add(filter, GBC.eol().fill(GBC.HORIZONTAL).weight(1.0, 0.0));
         this.add(scroll, GBC.eol().fill(GBC.HORIZONTAL));
     }
Index: trunk/src/org/openstreetmap/josm/gui/preferences/shortcut/PrefJPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/shortcut/PrefJPanel.java	(revision 17767)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/shortcut/PrefJPanel.java	(revision 17768)
@@ -8,8 +8,6 @@
 import java.awt.Component;
 import java.awt.Dimension;
-import java.awt.GridBagConstraints;
 import java.awt.GridBagLayout;
 import java.awt.GridLayout;
-import java.awt.Insets;
 import java.awt.Toolkit;
 import java.awt.event.KeyEvent;
@@ -21,5 +19,4 @@
 
 import javax.swing.AbstractAction;
-import javax.swing.BorderFactory;
 import javax.swing.BoxLayout;
 import javax.swing.DefaultComboBoxModel;
@@ -44,4 +41,5 @@
 import org.openstreetmap.josm.gui.widgets.FilterField;
 import org.openstreetmap.josm.gui.widgets.JosmComboBox;
+import org.openstreetmap.josm.tools.GBC;
 import org.openstreetmap.josm.tools.KeyboardUtils;
 import org.openstreetmap.josm.tools.Logging;
@@ -251,17 +249,6 @@
         // copied from PluginPreference
         JPanel pnl = new JPanel(new GridBagLayout());
-        pnl.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
-        GridBagConstraints gc = new GridBagConstraints();
-
-        gc.anchor = GridBagConstraints.NORTHWEST;
-        gc.fill = GridBagConstraints.HORIZONTAL;
-        gc.weightx = 0.0;
-        gc.insets = new Insets(0, 0, 0, 5);
-        pnl.add(new JLabel(tr("Search:")), gc);
-
-        gc.gridx = 1;
-        gc.weightx = 1.0;
-        pnl.add(filterField, gc);
-        pnl.setMaximumSize(new Dimension(300, 10));
+        pnl.add(filterField, GBC.eol().insets(0, 0, 0, 5).fill(GBC.HORIZONTAL));
+        pnl.setMaximumSize(new Dimension(Integer.MAX_VALUE, 10));
         return pnl;
     }
Index: trunk/src/org/openstreetmap/josm/gui/widgets/FilterField.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/widgets/FilterField.java	(revision 17767)
+++ trunk/src/org/openstreetmap/josm/gui/widgets/FilterField.java	(revision 17768)
@@ -18,4 +18,5 @@
 import javax.swing.table.TableRowSorter;
 
+import org.openstreetmap.josm.tools.ImageProvider;
 import org.openstreetmap.josm.tools.Logging;
 import org.openstreetmap.josm.tools.Utils;
@@ -31,6 +32,16 @@
      */
     public FilterField() {
+        setSearchIcon(this);
         setToolTipText(tr("Enter a search expression"));
         SelectAllOnFocusGainedDecorator.decorate(this);
+    }
+
+    /**
+     * Sets the search icon for the given text field
+     * @param textField the text field
+     * @since 17768
+     */
+    public static void setSearchIcon(JosmTextField textField) {
+        textField.setIcon(ImageProvider.get("listsearch"));
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/widgets/JosmTextField.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/widgets/JosmTextField.java	(revision 17767)
+++ trunk/src/org/openstreetmap/josm/gui/widgets/JosmTextField.java	(revision 17768)
@@ -11,5 +11,8 @@
 import java.awt.event.FocusListener;
 
+import javax.swing.BorderFactory;
+import javax.swing.Icon;
 import javax.swing.JTextField;
+import javax.swing.border.Border;
 import javax.swing.text.Document;
 
@@ -31,4 +34,6 @@
     private final PopupMenuLauncher launcher;
     private String hint;
+    private Icon icon;
+    private int leftInsets;
 
     /**
@@ -149,4 +154,28 @@
 
     /**
+     * Returns the icon to display
+     * @return the icon to display
+     * @since 17768
+     */
+    public Icon getIcon() {
+        return icon;
+    }
+
+    /**
+     * Sets the icon to display
+     * @param icon the icon to set
+     * @since 17768
+     */
+    public void setIcon(Icon icon) {
+        this.icon = icon;
+        if (icon != null) {
+            this.leftInsets = getInsets().left;
+            Border original = getBorder();
+            Border margin = BorderFactory.createEmptyBorder(0, icon.getIconWidth(), 0, 0);
+            setBorder(original == null ? margin : BorderFactory.createCompoundBorder(original, margin));
+        }
+    }
+
+    /**
      * Empties the internal undo manager.
      * @since 14977
@@ -159,4 +188,8 @@
     public void paint(Graphics g) {
         super.paint(g);
+        if (icon != null) {
+            int h = getHeight() - icon.getIconHeight();
+            icon.paintIcon(this, g, Math.min(leftInsets, h / 2), h / 2);
+        }
         if (hint != null && !hint.isEmpty() && getText().isEmpty() && !isFocusOwner()) {
             // Taken from http://stackoverflow.com/a/24571681/2257172
Index: trunk/src/org/openstreetmap/josm/gui/widgets/SearchTextResultListPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/widgets/SearchTextResultListPanel.java	(revision 17767)
+++ trunk/src/org/openstreetmap/josm/gui/widgets/SearchTextResultListPanel.java	(revision 17768)
@@ -43,5 +43,5 @@
         super(new BorderLayout());
 
-        edSearchText = new JosmTextField();
+        edSearchText = new FilterField();
         edSearchText.getDocument().addDocumentListener(DocumentAdapter.create(ignore -> filterItems()));
         edSearchText.addKeyListener(new KeyAdapter() {
