Index: applications/editors/josm/plugins/slippy_map_chooser/src/SlippyMapChooser.java
===================================================================
--- applications/editors/josm/plugins/slippy_map_chooser/src/SlippyMapChooser.java	(revision 10258)
+++ applications/editors/josm/plugins/slippy_map_chooser/src/SlippyMapChooser.java	(revision 10310)
@@ -11,4 +11,6 @@
 import java.awt.Point;
 import java.awt.Toolkit;
+import java.awt.event.ComponentEvent;
+import java.awt.event.ComponentListener;
 import java.awt.geom.Point2D;
 import java.util.Vector;
@@ -36,5 +38,5 @@
  * 
  */
-public class SlippyMapChooser extends JMapViewer implements DownloadSelection {
+public class SlippyMapChooser extends JMapViewer implements DownloadSelection, ComponentListener {
 
 	private DownloadDialog iGui;
@@ -56,4 +58,6 @@
 	TileLoader cachedLoader;
 	TileLoader uncachedLoader;
+	JPanel slipyyMapTabPanel;
+	boolean firstShown = true;
 
 	/**
@@ -69,4 +73,5 @@
 		setFileCacheEnabled(SlippyMapChooserPlugin.ENABLE_FILE_CACHE);
 		setMaxTilesInmemory(SlippyMapChooserPlugin.MAX_TILES_IN_MEMORY);
+		addComponentListener(this);
 	}
 
@@ -84,14 +89,13 @@
 	public void addGui(final DownloadDialog gui) {
 		iGui = gui;
-		JPanel temp = new JPanel();
-		temp.setLayout(new BorderLayout());
-		temp.add(this, BorderLayout.CENTER);
-		temp.add(new JLabel((tr("Zoom: Mousewheel or double click.   "
+		slipyyMapTabPanel = new JPanel();
+		slipyyMapTabPanel.setLayout(new BorderLayout());
+		slipyyMapTabPanel.add(this, BorderLayout.CENTER);
+		slipyyMapTabPanel.add(new JLabel((tr("Zoom: Mousewheel or double click.   "
 				+ "Move map: Hold right mousebutton and move mouse.   Select: Click."))),
 				BorderLayout.SOUTH);
-		iGui.tabpane.add(temp, tr("Slippy map"));
-
-		new OsmMapControl(this, temp, iSizeButton, iSourceButton);
-		boundingBoxChanged(gui);
+		iGui.tabpane.add(slipyyMapTabPanel, tr("Slippy map"));
+		iGui.tabpane.addComponentListener(this);
+		new OsmMapControl(this, slipyyMapTabPanel, iSizeButton, iSourceButton);
 	}
 
@@ -250,3 +254,21 @@
 	}
 
+	public void componentHidden(ComponentEvent e) {
+	}
+
+	public void componentMoved(ComponentEvent e) {
+	}
+
+	public void componentShown(ComponentEvent e) {
+	}
+
+	public void componentResized(ComponentEvent e) {
+		if (!this.equals(e.getSource()) || getHeight() == 0 || getWidth() == 0)
+			return;
+		firstShown = false;
+		// The bounding box has to be set after SlippyMapChooser's size has been
+		// finally set - otherwise the zoom level will be totally wrong (too wide)
+		boundingBoxChanged(iGui);
+	}
+
 }
