title: Optimizing painting of a JFrame with a large number of components in Java
body: <p>So I have the following problem.
  I create a JInternalFrame with a VERY LARGE NUMBER of components (lets say 50 000 of text areas). First I do all the logic ( capture all the data which is displayed in the text areas ) and after I set the frame visible, what makes the program freeze ( I suppose it paints all the components).</p>
  
  <p>What would be the best way to optimize the painting ?
  I guess I should use separate threads so the program wont freeze, but what would be the best approach ?
  Should I set the frame visible first and then do the login in a thread or should I do all the login and then paint it in a thread ( if so how to paint child components apart from the parent ), or maybe something else ?</p>
  
  <p>Thanks in advance</p>