Question : Java - Transparent JScrollPane

I have a JTextArea and it's riding ontop of a JScrollPane. Anyways, I know I can use the `getViewPort()` method to set the opaque of of the view port... but I cannot seem to find any sign of how to do that... anywhere. :S

Here is what I have so far:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
     if (e.getKeyCode() == KeyEvent.VK_F)
    {
    	if (sp.isVisible())
    	{
    		sp.setVisible(false);
    	}
    	else
    	{
    		sp.setVisible(true);
    	}
    }

Answer : Java - Transparent JScrollPane

textarea.setOpaque(false);
Random Solutions  
 
programming4us programming4us