350 |
|
|
351 |
if (arrowIcon != null && (c instanceof JMenu)) |
if (arrowIcon != null && (c instanceof JMenu)) |
352 |
{ |
{ |
353 |
Component parent = m.getParent(); |
if (!((JMenu) c).isTopLevelMenu()) |
|
if (parent instanceof JPopupMenu) |
|
354 |
// It is a MenuItem |
// It is a MenuItem |
355 |
d.width += arrowIcon.getIconWidth() + parent.getWidth(); |
d.width += arrowIcon.getIconWidth() + m.getParent().getWidth(); |
356 |
else |
else |
357 |
// It is a Menu, no arrowIcon painted. |
// It is a Menu, no arrowIcon painted. |
358 |
d.width += MenuGap; |
d.width += MenuGap; |