JOptionPane's dialog window doesn't repaint sometimes.
FULL PRODUCT VERSION :
- Reported on JDK 6u7
FULL OPERATING SYSTEM VERSION :
- Reported on Windows Vista SP1
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
We can reproduce the problem using the following sample program by clicking "OK" repeatedly. It is difficult to predict the number of trials (clicking "OK") that we need to reproduce the symptom, but
the symptom seems to reproduce once per about 1000 trials.
---------- BEGIN SOURCE ----------
public class Main {
public static void main(String[] args) {
for (int count = 1; count < 2000; ++count) {
System.out.println("[" + count + "]");
JOptionPane.showMessageDialog(null, "Messages", null, JOptionPane.INFORMATION_MESSAGE);
}
}
}
---------- END SOURCE ----------
You can also get the original Japanese (ja_JP.PCK / Shift-JIS encoding) version of this sample program at:
/net/cores.central/cores/dir16/71173356/Main/Main.java
EXPECTED VERSUS ACTUAL BEHAVIOR :
Expected:
The inner area of the dialog is always painted normally, and "Messages"
string and "OK" button appear.
Actual:
The area is sometimes not repainted, and "Messages" and "OK" button
are invisible. (The "OK" button is invisible but active/clickable.)
Please see /net/cores.central/cores/dir16/71173356/my_screenshots/*.JPG .
REPRODUCIBILITY :
The problem doesn't exist on solaris / linux but reproduce it on windows.
- Tested and reproduced on Windows Vista (and SP1, SP2) and Windows XP (and SP2, SP3)
- Reproducible on JDK 1.5.0, JDK 6 and JDK7ea (b63)
CUSTOMER WORKAROUND :
Nothing.