title: Swing "blocking", I think I need to thread, but not sure how much
body: <p>I have a little java app to effectively "tail" an arbitrary collection of files defined in an ini file. My "LogReader" class extends JFrame, and does the heavy lifting; reading the collection of file paths into a vector, and then iterating over the vector, reading each file and adding the last X lines of each to a text areas on the tabs of a JTabbedPane. The process of building the vector and iterating over the files is kicked off by clicking a JButton, via an ActionListener.</p>
  
  <p>The reading of the files worked fine (and still does), but the process of reading 20-some files, some growing as large as 30MB, takes some time. To help pass that time, I decided to add a progress screen, which says "Now reading file #3 of 26: c:\logs\superduper1.log", and so on. So I created another class, "SplashScreen", also extending JFrame, and added a JLabel that would indicate the progress. The SplashScreen class has an update() method, which just does a setText() on the JLabel.</p>
  
  <p>The ActionListener on the JButton calls RefreshLogs(), which looks something like:</p>
  
  <pre><code>vctFileStrings.clear();
  tpMain.removeAll();
  frmSplash.update("Loading Configuration"); //Update the label on the Splash Screen instance
  BuildVectorOfLogs(strConfFile); //Read the collection of files into the vector
  frmSplash.update("Reading Logs");
  ReadLogs(); //read the files, updating the Splash Screen as we go
  </code></pre>
  
  <p>and then ReadLogs() iterates over the vector, reading the files and building the TabbedPane.</p>
  
  <p>What I noticed, though, is that when RefreshLogs() is called from within the ActionListener, the Splash Screen doesn't update. However, if I add RefreshLogs() to the constructor of the first frame, the splash screen works as expected (updates progress on each file). After some experimenting and reading, I think that I need to create a worker thread that reads the files, while updating the splash screen in the event-dispatch queue.</p>
  
  <p>My questions are:<BR>
  - Is my thought correct? Is there some simple alternative to implementing threading that would allow me to update the splash screen from the method called by the ActionListener?<BR>
  - If this would be best accomplished using threading, what scope of the activity would I need to thread? Would I need to put all of the file I/O activities into their own thread? Should I put the GUI activities (label updates) in their own thread, so they occur separately from the JButton click event?</p>