Insubstantial / insubstantial

Swing look-and-feel library and assorted widgets
193 stars 57 forks source link

NPE in SubstanceInternalFrameTitlePane.setActive(...) #65

Closed Stephane-D closed 12 years ago

Stephane-D commented 12 years ago

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.

Stephane-D commented 12 years ago

Thanks for fixing that issue :)