title: Java Swing: Ghost text showing up when updating text on a JTextArea with partially transparent background
body: <p>So here's the deal:</p>
  
  <p>I've got a JPanel and a JTextArea inside that one. The JPanel has a background color which has an alpha value of 200, ie. you can paritally see the background image through the JPanel. Ain't that called partial transparency? Anyway, then I've set the JTextArea non-opaque, so that I can fully see through that one:</p>
  
  <pre><code>JPanel p = new JPanel();
  p.setBackground(new Color(237, 234, 215, 200);
  JTextArea jta = new JTextArea("Blahblahblahblah");
  jta.setOpaque(false);
  p.add(jta);
  </code></pre>
  
  <p>Ok, so when I hit a button, the text will be changed like this:</p>
  
  <pre><code>jta.setText("new BlahBlah...");
  </code></pre>
  
  <p>Then it happens: <strong>the first text remains back there with a new partially transparent film on it.</strong> And the text I added, comes on top of course, but right there behind you can see the previous one. When I change the text some few times more, the ghost disappears.</p>
  
  <p><a href="http://dl.dropbox.com/u/16177434/haamuJTextArea.png" rel="nofollow" title="A screenshot">The screenshot as a link.</a></p>
  
  <p><strong><em>Translation (the screenshot has 3 shots on a row):</em></strong> <br><em>Left one:</em> "Question # 1 out of 8: (a political question)? (My comment: OK)"<br><em>Center:</em> "Question # 2 out of 8: (another question, never mind)? (My comment: The ghost is there! [and the arrow pointing it out])"<br><em>Right-hand side:</em> "Question # 8 out of 8: (another question)? (My comment: OK)"</p>
  
  <p>If I reduce the amount of questions this program swaps, from 8 to 3, for example, the last one looks usually good, the ghost is gone. But sometimes it sticks on no matter what I do. Could it possibly have something to do with not enough memory (I hardly swallow that, though)?</p>
  
  <p>So, please help me out, dudes! I've got the deadline in 48 hrs.</p>
  
  <p><em>PS. In case you wonder, that language is Finnish. I'm working on a school project: It's gonna be a comparing machine that can have a variety of applications: For example, if you have a public election coming, the press/media may use this kind of machine on the web to get the candidate's opinions on whatever issues, and then voters may enter their opinions too, and the machine calculates which candidates match the voter's thoughts best. See my homepage, ie. the project blog (Finnish) for more screenshots in case you're interested.</em></p>
  
  <p><em>an55i</em></p>