JTabbedPane slow first new tab

I have noticed something strange with my Swing user interface. I'm going to describe the symptoms and hopefully someone can help me narrow the problem to a bit of code that I can post. Currently, I have no idea about which part of my code may be causing the problem.

I have a JTabbedPane with one tab that contains a JTable. This part of the GUI is displayed at start up. If a user opens a text file, the text is added to a JTextArea and then displayed in a new tab. The first time that I open a text file there is a noticeable delay before it is displayed. Every subsequent file that is opened is displayed very quickly in a new tab. Why would there be such a delay with the first new tab that is added but not the other?

Thanks

Message was edited by:

Jstats

[792 byte] By [Jstatsa] at [2007-11-27 5:57:56]
# 1
Sounds like initialization is your enemy. You should use a profiler to check.
rebola at 2007-7-12 16:31:42 > top of Java-index,Desktop,Core GUI APIs...