title: 2 Synchronized JScrollPanes inside JSplitPane not working properly
body: <p>I have an issue with Swing. I have placed two JScrollPane inside a JSplitPane horizontally and have synchronized the JScrollPanes. Inside each of the JScrollPane I have placed one JPanel. The synchronization i.e. (scrolling a JScrollPane also scrolls the other JScrollPane) between the two JScrollPane works normally. But when I drag the JSplitPane divider towards left/right till some part of a JPanel becomes hidden then horizontal scroll bar is shown but in disabled form. I am not able to scroll to see the hidden part of JPanel.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>import java.awt.BorderLayout;
  import javax.swing.JFrame;
  import javax.swing.JLabel;
  import javax.swing.JPanel;
  import javax.swing.JScrollPane;
  import javax.swing.JSplitPane;
  
  public class SplitPaneTest extends JFrame {
  
      public SplitPaneTest() {
  
          setTitle( "Splits" );
          setDefaultCloseOperation( EXIT_ON_CLOSE );
          setSize( 400, 400 );
  
          JPanel panel1 = new JPanel();
          panel1.setLayout(new BorderLayout());
  
          panel1.add( new JLabel( "Left panel!" ) );
          JScrollPane scrollPane1 = new JScrollPane(panel1);
  
          JPanel panel2 = new JPanel();
          panel2.setLayout(new BorderLayout());
  
          panel2.add( new JLabel( "Right Panel" ) );
          JScrollPane scrollPane2 = new JScrollPane(panel2);
  
          scrollPane2.getVerticalScrollBar().setModel(scrollPane1.getVerticalScrollBar().getModel());
          scrollPane2.getHorizontalScrollBar().setModel(scrollPane1.getHorizontalScrollBar().getModel());
  
          JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, scrollPane1,
                  scrollPane2);
          splitPane.setResizeWeight(0.5);
          add(splitPane);
  
          setVisible( true );
  
      }
  
      public static void main( String[] args ) {
          new SplitPaneTest();
      }
  
  }
  </code></pre>