Index: trunk/src/org/openstreetmap/josm/gui/ImageryMenu.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/ImageryMenu.java	(revision 7290)
+++ trunk/src/org/openstreetmap/josm/gui/ImageryMenu.java	(revision 7291)
@@ -8,5 +8,4 @@
 import java.awt.GraphicsEnvironment;
 import java.awt.MenuComponent;
-import java.awt.Toolkit;
 import java.awt.event.ActionEvent;
 import java.util.ArrayList;
@@ -108,7 +107,7 @@
     private void setupMenuScroller() {
         if (!GraphicsEnvironment.isHeadless()) {
-            int screenHeight = Toolkit.getDefaultToolkit().getScreenSize().height;
             int menuItemHeight = singleOffset.getPreferredSize().height;
-            MenuScroller.setScrollerFor(this, (screenHeight / menuItemHeight)-1);
+            MenuScroller.setScrollerFor(this, 
+                    MenuScroller.computeScrollCount(this, menuItemHeight));
         }
     }
Index: trunk/src/org/openstreetmap/josm/gui/MainMenu.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/MainMenu.java	(revision 7290)
+++ trunk/src/org/openstreetmap/josm/gui/MainMenu.java	(revision 7291)
@@ -8,5 +8,4 @@
 import java.awt.Component;
 import java.awt.GraphicsEnvironment;
-import java.awt.Toolkit;
 import java.awt.event.KeyEvent;
 import java.util.HashMap;
@@ -571,7 +570,7 @@
         final JMenu menu = new JMenu(tr(name));
         if (!GraphicsEnvironment.isHeadless()) {
-            int screenHeight = Toolkit.getDefaultToolkit().getScreenSize().height;
             int menuItemHeight = new JMenu().add(newAction).getPreferredSize().height;
-            MenuScroller.setScrollerFor(menu, screenHeight / menuItemHeight);
+            MenuScroller.setScrollerFor(menu,
+                    MenuScroller.computeScrollCount(menu, menuItemHeight));
         }
         return addMenu(menu, name, mnemonicKey, position, relativeHelpTopic);
Index: trunk/src/org/openstreetmap/josm/gui/MenuScroller.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/MenuScroller.java	(revision 7290)
+++ trunk/src/org/openstreetmap/josm/gui/MenuScroller.java	(revision 7291)
@@ -9,4 +9,6 @@
 import java.awt.Dimension;
 import java.awt.Graphics;
+import java.awt.GraphicsConfiguration;
+import java.awt.Insets;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
@@ -26,4 +28,6 @@
 import javax.swing.event.PopupMenuListener;
 
+import org.openstreetmap.josm.Main;
+
 /**
  * A class that provides scrolling capabilities to a long menu dropdown or
@@ -32,5 +36,5 @@
  * <P>
  * <B>Implementation note:</B>  The default number of items to display
- * at a time is 15, and the default scrolling interval is 125 milliseconds.
+ * at a time is 15, and the default scrolling interval is 150 milliseconds.
  * <P>
  * @author Darryl, https://tips4java.wordpress.com/2009/02/01/menu-scroller/
@@ -51,4 +55,38 @@
     private int keepVisibleIndex = -1;
 
+    private static final int ARROW_ICON_HEIGHT = 10;
+
+    /**
+     * Computes the number of items to display at once for the given component and a given item height.
+     * @param comp The menu
+     * @param itemHeight Average item height
+     * @return the number of items to display at once
+     * @since 7291
+     */
+    public static int computeScrollCount(JComponent comp, int itemHeight) {
+        int result = 15;
+        if (comp != null && itemHeight > 0) {
+            // Compute max height of current screen
+            int maxHeight = 0;
+            GraphicsConfiguration gc = comp.getGraphicsConfiguration();
+            if (gc == null && Main.parent != null) {
+                gc = Main.parent.getGraphicsConfiguration();
+            }
+            if (gc != null) {
+                // Max displayable height (max screen height - vertical insets)
+                Insets insets = comp.getToolkit().getScreenInsets(gc);
+                maxHeight = gc.getBounds().height - insets.top - insets.bottom;
+            }
+
+            // Remove height of our two arrow icons + 2 pixels each for borders (arbitrary value)
+            maxHeight -= 2*(ARROW_ICON_HEIGHT+2);
+
+            if (maxHeight > 0) {
+                result = (maxHeight/itemHeight)-2;
+            }
+        }
+        return result;
+    }
+
     /**
      * Registers a menu to be scrolled with the default number of items to
@@ -177,5 +215,5 @@
      */
     public MenuScroller(JMenu menu) {
-        this(menu, 15);
+        this(menu, computeScrollCount(menu, 30));
     }
 
@@ -188,5 +226,5 @@
      */
     public MenuScroller(JPopupMenu menu) {
-        this(menu, 15);
+        this(menu, computeScrollCount(menu, 30));
     }
 
@@ -594,5 +632,5 @@
         @Override
         public int getIconHeight() {
-            return 10;
+            return ARROW_ICON_HEIGHT;
         }
     }
Index: trunk/src/org/openstreetmap/josm/gui/layer/ImageryLayer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/ImageryLayer.java	(revision 7290)
+++ trunk/src/org/openstreetmap/josm/gui/layer/ImageryLayer.java	(revision 7291)
@@ -11,5 +11,4 @@
 import java.awt.Graphics;
 import java.awt.GridBagLayout;
-import java.awt.Toolkit;
 import java.awt.event.ActionEvent;
 import java.awt.image.BufferedImage;
@@ -206,5 +205,5 @@
         }
         if (menuItemHeight > 0) {
-            int scrollcount = (Toolkit.getDefaultToolkit().getScreenSize().height / menuItemHeight) - 1;
+            int scrollcount = MenuScroller.computeScrollCount(subMenu, menuItemHeight);
             if (subMenu instanceof JMenu) {
                 MenuScroller.setScrollerFor((JMenu) subMenu, scrollcount);
