Index: /trunk/src/org/openstreetmap/josm/gui/preferences/server/ProxyPreferencesPanel.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/server/ProxyPreferencesPanel.java	(revision 2822)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/server/ProxyPreferencesPanel.java	(revision 2823)
@@ -100,18 +100,55 @@
         gc.anchor = GridBagConstraints.WEST;
         gc.insets = new Insets(5,5,0,0);
+        gc.fill = GridBagConstraints.HORIZONTAL;
+        gc.weightx = 0.0;
         pnl.add(new JLabel(tr("Host:")), gc);
 
         gc.gridx = 1;
-        pnl.add(tfProxyHttpHost = new JTextField(20),gc);
+        gc.weightx = 1.0;
+        pnl.add(tfProxyHttpHost = new JTextField(),gc);
 
         gc.gridy = 1;
         gc.gridx = 0;
+        gc.fill = GridBagConstraints.NONE;
+        gc.weightx = 0.0;
         pnl.add(new JLabel(trc("server", "Port:")), gc);
 
         gc.gridx = 1;
-        gc.weightx = 0.0;
+        gc.weightx = 1.0;
         pnl.add(tfProxyHttpPort = new JTextField(5),gc);
+        tfProxyHttpPort.setMinimumSize(tfProxyHttpPort.getPreferredSize());
 
         gc.gridy = 2;
+        gc.gridx = 0;
+        gc.gridwidth = 2;
+        gc.fill = GridBagConstraints.HORIZONTAL;
+        gc.weightx = 1.0;
+        pnl.add(new JMultilineLabel(tr("Please enter a username and a password if your proxy requires authentication.")), gc);
+
+        gc.gridy = 3;
+        gc.gridx = 0;
+        gc.gridwidth = 1;
+        gc.fill = GridBagConstraints.NONE;
+        gc.weightx = 0.0;
+        pnl.add(new JLabel(tr("User:")), gc);
+
+        gc.gridy = 3;
+        gc.gridx = 1;
+        gc.weightx = 1.0;
+        pnl.add(tfProxyHttpUser = new JTextField(20),gc);
+        tfProxyHttpUser.setMinimumSize(tfProxyHttpUser.getPreferredSize());
+
+        gc.gridy = 4;
+        gc.gridx = 0;
+        gc.weightx = 0.0;
+        pnl.add(new JLabel(tr("Password:")), gc);
+
+        gc.gridx = 1;
+        gc.weightx = 1.0;
+        pnl.add(tfProxyHttpPassword = new JPasswordField(20),gc);
+        tfProxyHttpPassword.setMinimumSize(tfProxyHttpPassword.getPreferredSize());
+
+        // add an extra spacer, otherwise the layout is broken
+        gc.gridy = 5;
         gc.gridx = 0;
         gc.gridwidth = 2;
@@ -119,23 +156,5 @@
         gc.weightx = 1.0;
         gc.weighty = 1.0;
-        pnl.add(new JLabel(tr("Please enter a username and a password if your proxy requires authentication.")), gc);
-
-        gc.gridy = 3;
-        gc.gridx = 0;
-        gc.gridwidth = 1;
-        gc.weightx = 0.0;
-        gc.fill = GridBagConstraints.NONE;
-        pnl.add(new JLabel(tr("User:")), gc);
-
-        gc.gridy = 3;
-        gc.gridx = 1;
-        pnl.add(tfProxyHttpUser = new JTextField(20),gc);
-
-        gc.gridy = 4;
-        gc.gridx = 0;
-        pnl.add(new JLabel(tr("Password:")), gc);
-
-        gc.gridx = 1;
-        pnl.add(tfProxyHttpPassword = new JPasswordField(20),gc);
+        pnl.add(new JPanel(), gc);
         return pnl;
     }
@@ -156,15 +175,22 @@
         gc.anchor = GridBagConstraints.WEST;
         gc.insets = new Insets(5,5,0,0);
+        gc.fill = GridBagConstraints.HORIZONTAL;
+        gc.weightx = 0.0;
         pnl.add(new JLabel(tr("Host:")), gc);
 
         gc.gridx = 1;
+        gc.weightx = 1.0;
         pnl.add(tfProxySocksHost = new JTextField(20),gc);
 
         gc.gridy = 1;
         gc.gridx = 0;
+        gc.weightx = 0.0;
+        gc.fill = GridBagConstraints.NONE;
         pnl.add(new JLabel(trc("server", "Port:")), gc);
 
         gc.gridx = 1;
-        pnl.add(tfProxySocksPort = new JTextField(5),gc);
+        gc.weightx = 1.0;
+        pnl.add(tfProxySocksPort = new JTextField(5), gc);
+        tfProxySocksPort.setMinimumSize(tfProxySocksPort.getPreferredSize());
 
         // add an extra spacer, otherwise the layout is broken
