This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes SWT - Radio button text color question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "SWT - Radio button text color question" Watch "SWT - Radio button text color question" New topic

SWT - Radio button text color question

Marc LaFleur

Joined: Nov 03, 2009
Posts: 2
I have created a radio button and set some text to describe it.
Using the setForeground method does not work to change the color of the text.
Using setBackground does work but the text remains the default color.

Does anyone know how to change the radio button's default text color?

Freddy Wong
Ranch Hand

Joined: Sep 11, 2006
Posts: 959

Your code works fine for me.

SCJP 5.0, SCWCD 1.4, SCBCD 1.3, SCDJWS 1.4
My Blog
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: SWT - Radio button text color question
It's not a secret anymore!