>> Everything is cool, but when I call my Change Appearence dialog and
>> select a new skin, as soon as I call
[quoted text clipped - 25 lines]
>
> Tom Hawtin
Hi Tom,
Whats odd is that when I set the UI L&F before and frames are displayed
then the JToolBar comes up fine just as designed, the problem only
appears to occur when I do the
SwingUtilities.updateComponentTreeUI(this.getParent());
Although when I set the UI L&F before any frames are displayed I dont
actually have to call
SwingUtilities.updateComponentTreeUI(this.getParent());
rgds,
Dave.
Thomas Hawtin - 14 Jul 2005 22:32 GMT
> Whats odd is that when I set the UI L&F before and frames are displayed
> then the JToolBar comes up fine just as designed, the problem only
[quoted text clipped - 4 lines]
> actually have to call
> SwingUtilities.updateComponentTreeUI(this.getParent());
I guess the UI gets installed somewhere within addNotify.
Tom Hawtin

Signature
Unemployed English Java programmer
Andrew Thompson - 14 Jul 2005 22:44 GMT
[snip]
> Whats odd is that when I set the UI L&F before ..
I think example code would serve better than descriptions.
<http://www.physci.org/codes/sscce.jsp>

Signature
Andrew Thompson
physci.org 1point1c.org javasaver.com lensescapes.com athompson.info
Filmed on Location
Thomas Hawtin - 14 Jul 2005 23:46 GMT
> [snip]
>
>>Whats odd is that when I set the UI L&F before ..
>
> I think example code would serve better than descriptions.
> <http://www.physci.org/codes/sscce.jsp>
Well, here's some code showing a random case of PL&F playing nasty with
a LayoutManager. (It is technically dependent on the PL&F in use.)
import javax.swing.*;
class UILayoutManagerBug {
public static void main(String[] args) {
JList comp = new JList();
SpringLayout layout = new SpringLayout();
comp.setLayout(layout);
comp.updateUI();
if (comp.getLayout() != layout) {
System.err.println("Wrong LayoutManager");
}
}
}
I'll just go and file a bug to the effect that PL&F should
(consistently) use the UIResource idiom for LayoutManagers.
Tom Hawtin

Signature
Unemployed English Java programmer