wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes How to change Scroll Bar color Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How to change Scroll Bar color" Watch "How to change Scroll Bar color" New topic
Author

How to change Scroll Bar color

Nishan Patel
Ranch Hand

Joined: Sep 07, 2008
Posts: 684

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.


[Thumbnail for SwingScrollBarExample.PNG]



Thanks, Nishan Patel
SCJP 1.5, SCWCD 1.5, OCPJWSD Java Developer,My Blog
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38033
    
  22
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

Joined: Oct 13, 2005
Posts: 38033
    
  22
I think I have worked out why I am getting the wrong bar changing colour
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to change Scroll Bar color
 
Similar Threads
Highlighting bars on click event
Scroll Bars
apllet
Which is the best way to write action listeners?
Adding horizontal scroll bars to list box