Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Problem in changing forground color of JSlider!!

843805Jan 25 2006 — edited Nov 7 2006
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.. ??

gervini

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Dec 5 2006
Added on Jan 25 2006
11 comments
2,747 views