Insubstantial/insubstantial — Issue #65: NPE in SubstanceInternalFrameTitlePane.setActive(...)
Author: Stephane-D
Created: 2012-02-24 16:23:08+00:00
State: open

It was already the case in 7.1 and still present in 7.2.

We can have a NPE when we use the JInternalFrame.setSelected(..) method before the frame is actually visible (not really sure but i can make it easily happen) because the RootPane is not yet defined.
I fixed the problem by changing this

void setActive(boolean isActive) {
this.getRootPane().repaint();
}

by

void setActive(boolean isActive) {
repaint();
}

I think the SubstanceTitlePane is also impacted by the problem.