summaryrefslogtreecommitdiff
path: root/javax
diff options
context:
space:
mode:
Diffstat (limited to 'javax')
-rw-r--r--javax/swing/SwingUtilities.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/javax/swing/SwingUtilities.java b/javax/swing/SwingUtilities.java
index 216057e0e..6ac7b9816 100644
--- a/javax/swing/SwingUtilities.java
+++ b/javax/swing/SwingUtilities.java
@@ -890,7 +890,9 @@ public class SwingUtilities
iconR.y = 0;
textR.y = (horizontalTextPosition == CENTER
? iconR.height + textIconGap
- : iconR.height - textR.height);
+ : Math.max(iconR.height - textR.height, 0));
+ System.err.println("iconR.height: " + iconR.height);
+ System.err.println("textR.height: " + textR.height);
break;
case CENTER:
int centerLine = Math.max(textR.height, iconR.height) / 2;