JDK-4486388 : DefaultPopupFactory.popupFit() ignores frame insets
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.3.1
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2001-07-31
  • Updated: 2001-07-31
  • Resolved: 2001-07-31
Related Reports
Duplicate :  
Description

Name: krC82822			Date: 07/31/2001


java version "1.3.1"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-root-
010716-02:15)
Java HotSpot(TM) Client VM (build 1.3.1, mixed mode)

DefaultPopupFactory.popupFit() ignores frame insets.

If a popup's origin lies under the title bar, it should become a heavyweight,
but popupFit ignores the frame insets, so it's lightweight and part of it is
clipped by the titlebar.
(Review ID: 128385) 
======================================================================

Comments
WORK AROUND Name: krC82822 Date: 07/31/2001 I don't think developers can work around this. I'm adding insets to DefaultPopupFactory.popupFit in the Mac OS X JDK: Change return SwingUtilities.isRectangleContainingRectangle(parent.getBounds(),popu pRectInScreen); to Rectangle parentBounds = parent.getBounds(); Insets parentInsets = parent.getInsets(); parentBounds.x += parentInsets.left; parentBounds.y += parentInsets.right; parentBounds.width -= (parentInsets.left + parentInsets.right); parentBounds.height -= (parentInsets.top + parentInsets.bottom); return SwingUtilities.isRectangleContainingRectangle(parentBounds,popupRec tInScreen); ======================================================================
11-06-2004

EVALUATION This is a duplicate of 4223393, refer to it for details. scott.violet@eng 2001-07-31
31-07-2001