You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Elvy <pi...@gmail.com> on 2008/06/06 16:47:10 UTC

Re: Look And Feel

Now this is good answer !!!

It now seems to work. I'll be back if anything happens ;-)

THANKS a lot.


Martin Thelian wrote:
> 
> Hi,
> 
> have you tried to manually configure the classloader the UIMangager
> should use?
> 
> E.g. you can use the following in your bundle Activator:
> |> UIManager.put("ClassLoader", this.getClass().getClassLoader());
> 
> Martin
> 
> Elvy schrieb:
>> "*" in boot delegation doesn't resolve the problem.
>> Another idea?
>>
>>
>> Richard S. Hall wrote:
>>   
>>> Just a guess, but perhaps you are running into class loading issues.
>>>
>>> I know that Swing plaf infrastructure makes some assumptions about how 
>>> it can locate required classes -- they think they can ask any class 
>>> loader to find them and this won't work if the class loader is a bundle. 
>>> We try to catch this case, but cannot catch all cases.
>>>
>>> Just for a quick test, you can try to set felix' boot delegation 
>>> property in conf/config.properties to "*" and see if it solves your 
>>> issue. If so, then I would recommend trying to narrow it down to the 
>>> precise packages for which you need access.
>>>
>>> -> richard
>>>
>>> Elvy wrote:
>>>     
>>>> We try to set the look and feel with the properties swing.defaultlaf or
>>>> in
>>>> the code but we have some problems with menu items. Menu items are not
>>>> visible and we have this error :
>>>>
>>>> UIDefaults.getUI() failed: no ComponentUI class for:
>>>> javax.swing.JMenuItem[,0,0,
>>>> 0x0,invalid,alignmentX=0.0,alignmentY=0.0,border=,flags=0,maximumSize=,minimumSi
>>>> ze=,preferredSize=,defaultIcon=,disabledIcon=,disabledSelectedIcon=,margin=null,
>>>> paintBorder=false,paintFocus=false,pressedIcon=,rolloverEnabled=false,rolloverIc
>>>> on=,rolloverSelectedIcon=,selectedIcon=,text=]
>>>> java.lang.Error
>>>>         at javax.swing.UIDefaults.getUIError(UIDefaults.java:711)
>>>>         at
>>>> javax.swing.MultiUIDefaults.getUIError(MultiUIDefaults.java:117)
>>>>         at javax.swing.UIDefaults.getUI(UIDefaults.java:741)
>>>>         at javax.swing.UIManager.getUI(UIManager.java:1012)
>>>>         at javax.swing.JMenuItem.updateUI(JMenuItem.java:232)
>>>>         at javax.swing.JMenuItem.init(JMenuItem.java:194)
>>>>         at javax.swing.JMenuItem.<init>(JMenuItem.java:133)
>>>>         at javax.swing.JMenuItem.<init>(JMenuItem.java:92)
>>>>       
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
> 
> 
> 


-----
Tell me something you don't know!
-- 
View this message in context: http://www.nabble.com/Look-And-Feel-tp16896587p17693929.html
Sent from the Apache Felix - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Look And Feel

Posted by "Richard S. Hall" <he...@ungoverned.org>.
Seems like we should add this to one of our FAQs...

-> richard

Elvy wrote:
> Now this is good answer !!!
>
> It now seems to work. I'll be back if anything happens ;-)
>
> THANKS a lot.
>
>
> Martin Thelian wrote:
>   
>> Hi,
>>
>> have you tried to manually configure the classloader the UIMangager
>> should use?
>>
>> E.g. you can use the following in your bundle Activator:
>> |> UIManager.put("ClassLoader", this.getClass().getClassLoader());
>>
>> Martin
>>
>> Elvy schrieb:
>>     
>>> "*" in boot delegation doesn't resolve the problem.
>>> Another idea?
>>>
>>>
>>> Richard S. Hall wrote:
>>>   
>>>       
>>>> Just a guess, but perhaps you are running into class loading issues.
>>>>
>>>> I know that Swing plaf infrastructure makes some assumptions about how 
>>>> it can locate required classes -- they think they can ask any class 
>>>> loader to find them and this won't work if the class loader is a bundle. 
>>>> We try to catch this case, but cannot catch all cases.
>>>>
>>>> Just for a quick test, you can try to set felix' boot delegation 
>>>> property in conf/config.properties to "*" and see if it solves your 
>>>> issue. If so, then I would recommend trying to narrow it down to the 
>>>> precise packages for which you need access.
>>>>
>>>> -> richard
>>>>
>>>> Elvy wrote:
>>>>     
>>>>         
>>>>> We try to set the look and feel with the properties swing.defaultlaf or
>>>>> in
>>>>> the code but we have some problems with menu items. Menu items are not
>>>>> visible and we have this error :
>>>>>
>>>>> UIDefaults.getUI() failed: no ComponentUI class for:
>>>>> javax.swing.JMenuItem[,0,0,
>>>>> 0x0,invalid,alignmentX=0.0,alignmentY=0.0,border=,flags=0,maximumSize=,minimumSi
>>>>> ze=,preferredSize=,defaultIcon=,disabledIcon=,disabledSelectedIcon=,margin=null,
>>>>> paintBorder=false,paintFocus=false,pressedIcon=,rolloverEnabled=false,rolloverIc
>>>>> on=,rolloverSelectedIcon=,selectedIcon=,text=]
>>>>> java.lang.Error
>>>>>         at javax.swing.UIDefaults.getUIError(UIDefaults.java:711)
>>>>>         at
>>>>> javax.swing.MultiUIDefaults.getUIError(MultiUIDefaults.java:117)
>>>>>         at javax.swing.UIDefaults.getUI(UIDefaults.java:741)
>>>>>         at javax.swing.UIManager.getUI(UIManager.java:1012)
>>>>>         at javax.swing.JMenuItem.updateUI(JMenuItem.java:232)
>>>>>         at javax.swing.JMenuItem.init(JMenuItem.java:194)
>>>>>         at javax.swing.JMenuItem.<init>(JMenuItem.java:133)
>>>>>         at javax.swing.JMenuItem.<init>(JMenuItem.java:92)
>>>>>       
>>>>>           
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
>>
>>     
>
>
> -----
> Tell me something you don't know!
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org