Win a copy of TensorFlow 2.0 in Action this week in the Artificial Intelligence and Machine Learning forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

How to change Scroll Bar color

 
Ranch Hand
Posts: 689
Scala Eclipse IDE Java
  • 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]
 
Marshal
Posts: 70703
288
  • 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
Marshal
Posts: 70703
288
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic