<Swing Dev> Background/Foreground colors and Gtk Look and Feel

Omair Majid omajid at redhat.com
Wed Jan 21 16:47:38 UTC 2009


Hi,

Sorry for sending this email again, but I didn't get any response last 
time. Is there a better place for asking this?

I have noticed a few issues in the Gtk Look and Feel and would like to 
know what the correct behaviour should be. The attached program shows a 
few of my concerns.

1) For each of the components, setForeground(color) and/or 
setBackground(color) assignments are randomly ignored. Is this the 
expected behaviour? I can understand that using the native look and 
feel, the feel is exactly preserved and the programmer's preferences are 
ignored. But there doesn't seem to be any consistency - some components 
accept the color changes, some silently ignore it. Is there a list 
showing whether setForeground() and setBackground() is ignored for each 
swing component with the gtk look and feel?

2) The behaviour varies across jdk6 and openjdk6. For example, the 
closed-source jdk6 respects 
JTextPane.setBackground(UIManager.getColor("Panel.background")) but 
openjdk6 ignores it. In situations like this, what is the correct 
behaviour? Should I attempt to patch openjdk6 to behave more like closed 
source jdk6?

Thanks,

Omair
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TestGtkBackground.java
Type: text/x-java
Size: 2163 bytes
Desc: not available
URL: <http://mail.openjdk.java.net/pipermail/swing-dev/attachments/20090121/787a7b14/TestGtkBackground.java>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openjdk6.png
Type: image/png
Size: 14387 bytes
Desc: not available
URL: <http://mail.openjdk.java.net/pipermail/swing-dev/attachments/20090121/787a7b14/openjdk6.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sun-jdk.png
Type: image/png
Size: 11787 bytes
Desc: not available
URL: <http://mail.openjdk.java.net/pipermail/swing-dev/attachments/20090121/787a7b14/sun-jdk.png>


More information about the swing-dev mailing list