Win a copy of Getting started with Java programming language this week in the Beginning Java forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to change Scroll Bar color  RSS feed

 
Nishan Patel
Ranch Hand
Posts: 689
Eclipse IDE Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I want to change color of Swing scroll bar horizontal and vertical scroll bar color. I worked on that a lot but I am unable to find solution for that.

So can anyone know how to change color of that scroll bar. Please find attached image for more detail.
SwingScrollBarExample.PNG
[Thumbnail for SwingScrollBarExample.PNG]
 
Campbell Ritchie
Sheriff
Posts: 53561
126
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't know. . . . but I need practice writing Actions.Write some text into the two text components to get the scroll bars to appear.

No, you tell me why I get a colour change in the scroll bar at the bottom if I click the "vertical" button, and vice versa. Also see what you can make of the javax.swing.plaf.ScrollBarUI class. Also why the scroll handles don't change colour.
 
Campbell Ritchie
Sheriff
Posts: 53561
126
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think I have worked out why I am getting the wrong bar changing colour
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!