Re: UIDefaults.put() issue
- From: "Monique Y. Mudama" <spam@xxxxxxxxxxxxxxxx>
- Date: Tue, 31 Jan 2006 13:32:29 -0700
On 2006-01-31, Ike penned:
> For whatever reason, I am unable to alter the value in the UIManager
> LookAndFeelDefaults table. I must be doing something stupid, and would
> appreciate any direction here.
>
> For example, if, as shown in the following lines, I set the L&F to "Motif,"
> and then subsequently seek to override the "DeskTopIconUI" entry in the
> table with MetalDesktopIconUI, then, iterate through the values in the
> table, the DesktopIconUI value is STILL
> com.sun.java.swing.plaf.motif.MotifDesktopIconUI. Why does it no accept my
> override to javax.swing.plaf.metal.MetalDesktopIconUI ? Thank you, Ike
>
If I understand what you're doing properly,
"com.sun.java.swing.plaf.motif.MotifDesktopIconUI" is actually a key.
So what you should do is something like:
UIManager.put("DesktopIconUI",
UIManager.get("com.sun.java.swing.plaf.motif.MotifDesktopIconUI"));
>
> UIManager.setLookAndFeel("com.sun.java.swing.plaf.motif.MotifLookAndFeel");
> UIManager.put("DesktopIconUI",
> "javax.swing.plaf.metal.MetalDesktopIconUI");
> UIDefaults def = UIManager.getLookAndFeelDefaults();
> Enumeration enum = def.keys();
> while (enum.hasMoreElements()) {
> Object item = enum.nextElement();
> System.out.println(item +" " + def.get(item));
> }
>
>
>
--
monique
Ask smart questions, get good answers:
http://www.catb.org/~esr/faqs/smart-questions.html
.
- Follow-Ups:
- Re: UIDefaults.put() issue
- From: Ike
- Re: UIDefaults.put() issue
- References:
- UIDefaults.put() issue
- From: Ike
- UIDefaults.put() issue
- Prev by Date: UIDefaults.put() issue
- Next by Date: Re: UIDefaults.put() issue
- Previous by thread: UIDefaults.put() issue
- Next by thread: Re: UIDefaults.put() issue
- Index(es):
Relevant Pages
|
|