The problem:
The testcase is in /share/esc/1-9895956/
you can reproduced it with jdk 1.4.2_5 or later with patch 109147-34.
You will see the color problem. The problem looks like a "color flashing" problem.
But it is not. The problem happens on all graphics cards, if you set it to 8 bit
only. With 1.4.2_2 or older, you do not see this problem. Without 109147-34, even
with 1.4.2_7 you do not see this problem either.
To run the testcase:
setenv JDKHOME /net/koori.sfbay/onestop/jdk/1.4.2_08/latest/binaries/solaris-sparc/bin
1. compile java program
$JDKHOME/javac colorProblem.java
2. run the program
$JDKHOME/java colorProblem
3. move mouse focus to app, then move away, you will see it.
testcase:
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
class colorProblem extends JFrame
{
private static colorProblem fMaster = null;
private static boolean toggle = true;
public colorProblem(boolean master) {init(master);}
private void init(boolean master)
{
System.out.println("in init");
//JFrame f = new JFrame();
setBounds(100, 100, 300, 200);
if(master)
setTitle("Master");
else
setTitle("Slave");
Container content = getContentPane();
JButton button = new JButton();
button.setLabel("Exit");
button.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent event)
{
toggle = !toggle;
System.out.println("button press:"+toggle);
System.exit(0);
}
});
content.add(button);
setVisible(true);
}
public static void main(String[] args)
{
System.out.println("in main");
fMaster = new colorProblem(true);
}
}