This week's book giveaway is in the Testing forum.
We're giving away four copies of Data Structures the Fun Way: An Amusing Adventure with Coffee-Filled Examples and have Jeremy Kubica on-line!
See this thread for details.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

UIManager

 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When we want to change the UI default value,we use code like this :
UIManager.put("Tree.background", new Color(32,33,220));
UIManager.put("Tree.textBackground", new Color(240,22,240));
But how can i know the other string value, like "Tree.background"? For example,when i want to change the scrollbar's color ,what to do and where i can find the whole info about those work?
sorry , my english was very poor!
Thanks!
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can call getDefaults() or getLookAndFeelDefaults() on UIManager() and then call keys() or keySet() on the returned UIDefaults object to get all the current keys you can set values for. Most are pretty self-explanatory, but I'd test them out to make sure the look and feel you are using uses them like you think, and make sure they aren't used in other places.
 
Ranch Hand
Posts: 299
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I actually wrote a program/class to do this - allows you to see the current values visually. It's not totally done, but if anyone wants to see it, I can post what I have so far. I have some cool ideas for it just haven't gotten around to adding them.
Brian
[ March 18, 2004: Message edited by: Brian Pipa ]
 
He puts the "turd" in "saturday". Speaking of which, have you smelled this tiny ad?
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic