JDialog performance issue in jdk 1.5 and jdk 1.6

Recently, we switched our application to jdk 1.5 and observed that displaying the dialog is taking longer than in jdk 1.4. It seems to be a very peculiar problem. There is a delay of about 80 to 90 milliseconds between the JDialog's setVisible(true) call to the start of the paint method in the JDialog class with both jdk 1.5 and jdk 1.6. Has anyone observed a similar problem?

Some other things to be noted:

1. Its not a plain vanilla JDialog, but contains a scrollpane and a panel within it. The paint method barely takes a few milliseconds to complete.

2. We checked the EventQueue. There are no events waiting to get executed during the period the dialog is shown.

3. The gap between the setVisible and start of the paint method seems to be either 1 ms or about 90 ms. Never an in between value like 40-50.

4. We have tried using the default no parameter constructor for RepaintManager.

Hope someone can think of a good solution.

[979 byte] By [jimmyj75a] at [2007-11-27 8:13:46]
# 1
Has anyone observed something similar.
jimmyj75a at 2007-7-12 19:58:14 > top of Java-index,Desktop,Core GUI APIs...
# 2
I think, before you can expect any help, you'll have to explain why you consider this a problem that needs solving. JDialogs take almost a hundredth of a second longer to appear than they used to? How did you even notice that?
uncle_alicea at 2007-7-12 19:58:14 > top of Java-index,Desktop,Core GUI APIs...
# 3
> JDialogs take almost a hundredth of a> second longer to appear than they used to? How did> you even notice that?Considering also the fact that a JDialog awaits for user's input....
java_knighta at 2007-7-12 19:58:14 > top of Java-index,Desktop,Core GUI APIs...
# 4

These dialogs used to appear instantaneously with jdk 1.4. But with jdk 1.5 the dialogs appear after a few hundred milliseconds. We actually used a variable to store the System.nanoTime when the setVisible is called and computed the time it takes for the paint method of the dialog to be called. Thats the only place where we have found a difference in performance between jdk 1.4 and jdk 1.5.

jimmyj75a at 2007-7-12 19:58:14 > top of Java-index,Desktop,Core GUI APIs...
# 5
Can you post the SSCCE, for this issue? Otherwise is very hard for us to help you.
edtrujiroda at 2007-7-12 19:58:14 > top of Java-index,Desktop,Core GUI APIs...