Index: trunk/src/org/openstreetmap/josm/gui/JosmMetalToolTipUI.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/JosmMetalToolTipUI.java	(revision 17681)
+++ trunk/src/org/openstreetmap/josm/gui/JosmMetalToolTipUI.java	(revision 17681)
@@ -0,0 +1,41 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.gui;
+
+import java.awt.Graphics;
+
+import javax.swing.JComponent;
+import javax.swing.plaf.ComponentUI;
+import javax.swing.plaf.metal.MetalToolTipUI;
+
+import org.openstreetmap.josm.tools.Logging;
+
+/**
+ * Overrides MetalToolTipUI to workaround <a href="https://bugs.openjdk.java.net/browse/JDK-8262085">JDK-8262085</a>
+ * @since 17681
+ */
+public class JosmMetalToolTipUI extends MetalToolTipUI {
+
+    static final JosmMetalToolTipUI sharedInstance = new JosmMetalToolTipUI();
+
+    /**
+     * Returns an instance of the {@code JosmMetalToolTipUI}.
+     *
+     * @param c a component
+     * @return an instance of the {@code JosmMetalToolTipUI}.
+     */
+    public static ComponentUI createUI(JComponent c) {
+        return sharedInstance;
+    }
+
+    @Override
+    public void paint(Graphics g, JComponent c) {
+        try {
+            super.paint(g, c);
+        } catch (IllegalArgumentException e) {
+            if ("Width and height must be >= 0".equals(e.getMessage())) {
+                Logging.debug(e);
+            }
+            throw e;
+        }
+    }
+}
Index: trunk/src/org/openstreetmap/josm/gui/MainApplication.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/MainApplication.java	(revision 17679)
+++ trunk/src/org/openstreetmap/josm/gui/MainApplication.java	(revision 17681)
@@ -1047,4 +1047,6 @@
 
     static void applyWorkarounds() {
+        final String laf = UIManager.getLookAndFeel().getID();
+        final int javaVersion = Utils.getJavaVersion();
         // Workaround for JDK-8180379: crash on Windows 10 1703 with Windows L&F and java < 8u141 / 9+172
         // To remove during Java 9 migration
@@ -1055,5 +1057,4 @@
                 if (build != null) {
                     final int currentBuild = Integer.parseInt(build);
-                    final int javaVersion = Utils.getJavaVersion();
                     final int javaUpdate = Utils.getJavaUpdate();
                     final int javaBuild = Utils.getJavaBuild();
@@ -1070,9 +1071,8 @@
                 Logging.log(Logging.LEVEL_ERROR, null, e);
             }
-        } else if (PlatformManager.isPlatformOsx() && Utils.getJavaVersion() < 16) {
+        } else if (PlatformManager.isPlatformOsx() && javaVersion < 16) {
             // Workaround for JDK-8251377: JTabPanel active tab is unreadable in Big Sur, see #20075
             // os.version will return 10.16, or 11.0 depending on environment variable
             // https://twitter.com/BriceDutheil/status/1330926649269956612
-            final String laf = UIManager.getLookAndFeel().getID();
             final String macOSVersion = getSystemProperty("os.version");
             if ((laf.contains("Mac") || laf.contains("Aqua"))
@@ -1080,4 +1080,8 @@
                 UIManager.put("TabbedPane.foreground", Color.BLACK);
             }
+        }
+        // Workaround for JDK-8262085
+        if ("Metal".equals(laf) && javaVersion >= 11 && javaVersion < 17) {
+            UIManager.put("ToolTipUI", JosmMetalToolTipUI.class.getCanonicalName());
         }
     }
