This week's giveaway is in the Threads forum.
We're giving away four copies of Java Concurrency Live Lessons and have Doug Schmidt on-line!
See this thread for details.
Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

get(Object key) in UIDefaults  RSS feed

 
krishna prasad gunasekaran
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
uiClassID maps to a UI class in the default hash table.
This is the code

Object o=defaults.get(btnClassID);
Class c=(Class)defaults.get(o);
Object o2=defaults.get(c);

System.out.println(o);
System.out.println(c);
System.out.println(o2);


Output

com.sun.java.swing.plaf.windows.WindowsButtonUI //oputput1

class com.sun.java.swing.plaf.windows.WindowsButtonUI //output2

public static javax.swing.plaf.ComponentUI com.sun.java.swing.plaf.windows.WindowsButtonUI.createUI (javax.swing.JComponent) //output3

what's the third one for?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!