How to set SWT button foreground color?
The SWT Button class has a setForeground(Color) method but it seems to have no effect (the method is actually on Button's superclass). The javadoc says that this method is a hint and may be overridden by the platform. My platform is Windows. Does this mean that it is not possible to set button foreground color on Windows? Does it work on other platforms? Is there a workaround? On Windows, setForeground for Buttons has no effects. As a workaround, add a PaintListener to your Button . On this Listener's paintControl method, get the generated event's GC and, with it, re-write the text of your