This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Problem in changing forground color of JSlider!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Problem in changing forground color of JSlider!!" Watch "Problem in changing forground color of JSlider!!" New topic
Author

Problem in changing forground color of JSlider!!

michael byrd
Greenhorn

Joined: Jan 21, 2006
Posts: 23
Hello frnds,

I am adding JSlider to my program.. when I want to change background and foreground color of JSlider, background color changes to black correctly..

but foreground color.. (I want to have numbers with JSlider in white).. does not change to white.. !!


JSlider framesPerSecond = new JSlider(JSlider.HORIZONTAL, FPS_MIN, FPS_MAX, FPS_INIT);
framesPerSecond.setBackground(Color.black);
framesPerSecond.setForeground(Color.white);



Is default numbers of JSlider part of Background??
If yes.. is there any way to change color of numbers.. ??
 
Don't get me started about those stupid light bulbs.
 
subject: Problem in changing forground color of JSlider!!
 
Similar Threads
JTabbedPane color
Disabled components
Mac help - I thought Java was platform independent?
JSlider
Color of CheckBox