Mercurial > hg > release > icedtea7-forest-2.0 > jdk
changeset 4267:1eaff0300541
6888633: test/closed/javax/swing/JPopupMenu/4786415/bug4786415.java fails
Reviewed-by: rupashka, alexp
author | dav |
---|---|
date | Wed, 27 Apr 2011 17:46:59 +0400 |
parents | 0896c9712cf0 |
children | 015a66da6fcc |
files | src/share/classes/javax/swing/JPopupMenu.java |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/classes/javax/swing/JPopupMenu.java Wed Apr 27 15:26:38 2011 +0400 +++ b/src/share/classes/javax/swing/JPopupMenu.java Wed Apr 27 17:46:59 2011 +0400 @@ -342,8 +342,8 @@ // Calculate the screen size that popup should fit Dimension popupSize = JPopupMenu.this.getPreferredSize(); - int popupRightX = popupLocation.x + popupSize.width; - int popupBottomY = popupLocation.y + popupSize.height; + long popupRightX = (long)popupLocation.x + (long)popupSize.width; + long popupBottomY = (long)popupLocation.y + (long)popupSize.height; int scrWidth = scrBounds.width; int scrHeight = scrBounds.height; if (!canPopupOverlapTaskBar()) { @@ -358,13 +358,13 @@ int scrBottomY = scrBounds.y + scrHeight; // Ensure that popup menu fits the screen - if (popupRightX > scrRightX) { + if (popupRightX > (long)scrRightX) { popupLocation.x = scrRightX - popupSize.width; if( popupLocation.x < scrBounds.x ) { popupLocation.x = scrBounds.x ; } } - if (popupBottomY > scrBottomY) { + if (popupBottomY > (long)scrBottomY) { popupLocation.y = scrBottomY - popupSize.height; if( popupLocation.y < scrBounds.y ) { popupLocation.y = scrBounds.y;