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!

JButton tinted red

843807Jul 13 2010 — edited Jul 13 2010
I am trying to make a JButton that is red, but at the same time maintains the default java Look and Feel. There is no problem with changing the color of the button with
button.setBackground(Color.RED);
but when I do that, I lose the texturing effect that the Look and Feel provides. I tried setting the color of the JButton as a color with an alpha channel, but this did not provide the result that I wanted, either. Then I tried overlaying a translucent JPanel over my JButton
button.add(maskingPanel);
but this creates incomplete coverage, and messes with the layout that I am using.
does anyone know how to "tint" JButtons?

thanks much in advance,
-Monkeyman701
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 10 2010
Added on Jul 13 2010
3 comments
672 views