title: Java - Transparent JScrollPane
body: <p>I have a JTextArea and it's riding on top of a JScrollPane. Anyways, I know I can use the <code>getViewPort()</code> method to set the opaque property of the viewport, but I cannot seem to find any sign of how to do that anywhere.</p>
  <p>Here is what I have so far:</p>
  <pre><code>if (e.getKeyCode() == KeyEvent.VK_F)
  {
      if (sp.isVisible())
      {
          sp.setVisible(false);
      }
      else
      {
          sp.setVisible(true);
      }
  }
  </code></pre>