Browse Source

Fixed NPE when no TabFrameParent was set for PanelPopup.

Signed-off-by: weisj <weisj@arcor.de>
pull/15/head
weisj 5 years ago
parent
commit
d31a64c6e9
  1. 6
      src/main/java/com/github/weisj/darklaf/ui/tabframe/DarkPanelPopupUI.java

6
src/main/java/com/github/weisj/darklaf/ui/tabframe/DarkPanelPopupUI.java

@ -358,8 +358,10 @@ public class DarkPanelPopupUI extends DarkPanelUI implements PropertyChangeListe
if (focusOwner instanceof JTabFrame) return;
if (focusOwner instanceof JRootPane) return;
boolean focus = DarkUIUtil.hasFocus(popupComponent);
var container = popupComponent.getTabFrame().getContentPane().getContainer(popupComponent.getAlignment());
focus = focus || DarkUIUtil.hasFocus(container);
if (popupComponent.getTabFrame() != null) {
var container = popupComponent.getTabFrame().getContentPane().getContainer(popupComponent.getAlignment());
focus = focus || DarkUIUtil.hasFocus(container);
}
setHeaderBackground(focus);
}
}

Loading…
Cancel
Save