This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

question about UI delegate,help  RSS feed

 
Simeon Shi
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,everybody,
I read the source code of BasicToggleButtonUI today and confused about it.
As what you see,a JToggleButton has two states.When you pressed the button,
the background color will changed.It remain the background unless you press the
button again.
However, I found that the paint() method and painticon() method are quite similar to
these of BasicButtonUI which is the super class of BasicToggleButtonUI.I could not found
the snippet to keep the background color. Can anybody who is mastered in this to tell me
why?
thx in advancd.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!