Index: j2se/src/share/classes/javax/swing/JViewport.java =================================================================== --- j2se/src/share/classes/javax/swing/JViewport.java (Revision 252) +++ j2se/src/share/classes/javax/swing/JViewport.java (Arbeitskopie) @@ -1099,16 +1099,8 @@ * and do the song and dance to avoid allocating * a Rectangle object if we don't have to. */ - if (view instanceof JComponent) { - JComponent c = (JComponent)view; - oldX = c.getX(); - oldY = c.getY(); - } - else { - Rectangle r = view.getBounds(); - oldX = r.x; - oldY = r.y; - } + oldX = view.getX(); + oldY = view.getY(); /* The view scrolls in the opposite direction to mouse * movement.