[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cp-patches] Patch: Popup fix
From: |
Lillian Angel |
Subject: |
[cp-patches] Patch: Popup fix |
Date: |
Fri, 04 Nov 2005 13:46:49 -0500 |
I ran into a issue where the parent of the invoker of the Popup may be
set to null if some overriding class removes the Popup earlier than the
BasicPopupMenuUI.PopupMenuHandler. I got a NPE; when I resolved this, I
ran into problems actually removing the popup from the layeredPane
(because the invoker's parent is null, so the rootPane would be null).
It made more sense to create a variable to store the layeredPane when
the popup was created, since the same layeredPane is used to show and
hide the popup.
2005-11-04 Lillian Angel <address@hidden>
* javax/swing/plaf/basic/BasicMenuItemUI.java
(paintMenuItem): Changed to use isTopLevelMenu rather than
checking instance of parent.
* javax/swing/plaf/basic/BasicPopupMenuUI.java
(popupMenuWillBecomeInvisible): Added check to prevent NPE.
* javax/swing/Popup.java:
Added new private field.
(LightweightPopup): Initialized layeredPane.
(show): Removed unneeded code.
(hide): Likewise.
patch.diff
Description: Text Data
- [cp-patches] Patch: Popup fix,
Lillian Angel <=