title: Transparent JList in JScrollPane
body: <p>I am currently trying to make a JList opaque that is placed in a JScrollPane. I tried to set everything to <code>setOpaque(false)</code>, but it still doesn't work.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>import java.awt.GridBagConstraints;
  import java.awt.GridBagLayout;
  import java.awt.Insets;
  
  import javax.swing.DefaultListCellRenderer;
  import javax.swing.JList;
  import javax.swing.JPanel;
  import javax.swing.JScrollPane;
  
  public class NavigationView extends JPanel{
  
      private static final long serialVersionUID = 8033665282200374807L;
  
      private JScrollPane pane;
      private JList list;
  
      public NavigationView() {
          this.initialize();
          this.build();
          this.configure();
      }
  
      public void initialize() {
          this.pane = new JScrollPane();
          this.list = new JList();
      }
  
      public void build() {
          this.setLayout(new GridBagLayout());
          GridBagConstraints gbc = new GridBagConstraints();
          gbc.fill = GridBagConstraints.BOTH;
  
          gbc.gridx = 0;
          gbc.gridy = 0;
          gbc.weightx = 1;
          gbc.weighty = 1;
          gbc.gridwidth = 1;
          gbc.insets = new Insets(5, 5, 5, 5);
          this.add(this.pane, gbc);
      }
  
  
      public void configure() {
          this.pane.setOpaque(false);
          this.pane.setViewportView(this.list);
          this.pane.getViewport().setOpaque(false);
          this.list.setOpaque(false);
          ((DefaultListCellRenderer) this.list.getCellRenderer()).setOpaque(false);
      }
  }
  </code></pre>
  
  <p>If I add this panel to a JFrame with colored background I still see the bounds of the <code>NavigationView</code>-Panel with a white background.
  What am I doing wrong?</p>