I'm pretty sure it's a RAM issue, at least on my comp. I'm going to try that command line switch someone earlier suggested.
The same is here. Every time I open any TWS window form or close it this freezes up the whole application. Now I am relying more on Java API to enter the trades since it never freezes.
One of the issues that I had back in 07 was when I upgraded to Java 6. I reverted back to latest version of 5 at the time, and never had any issues since then.