title: JSplit Pane Divder Location Fixing
body: <p>i have two Split Pane..here's the code..what i want is Vertical divider shouldn't be allowed to be dragged, it could be expandable, but should be fixed on the divider location mentioned, one should not be able to move it using mouse upwards or downwards as we generally can, here's the code, what do i need to add ??    </p>
  
  <pre><code>package Arrears;
  
  import UI.UILabel;
  import UI.UIPanel;
  import ebg.MainApp;
  import java.awt.BorderLayout;
  import javax.swing.JInternalFrame;
  import javax.swing.JMenu;
  import javax.swing.JMenuBar;
  import javax.swing.JMenuItem;
  import javax.swing.JSplitPane;
  
  
  public class swingMenu extends JInternalFrame
  {
      JMenuBar mbar;
  
      JMenu fileMenu;
      JMenu helpMenu;
  
      JMenuItem openFileMenuItem;
      JMenuItem exitFileMenuItem;
  
      JSplitPane horiSplitPane;
      JSplitPane verSplitPane;
  
      UIPanel horiJPanel;
      UIPanel righJPanel;
      UIPanel downJPanel;
  
      UILabel side;
      UILabel right;
      UILabel down;
      public swingMenu(MainApp This)
      {
          super("");
  
          side=new UILabel("side");
          right=new UILabel("right");
          down=new UILabel("down");
  
          mbar=new JMenuBar();
  
          fileMenu=new JMenu("File");
          helpMenu=new JMenu("Help");
  
          openFileMenuItem=new JMenuItem("Open");
          exitFileMenuItem=new JMenuItem("Exit");
  
          fileMenu.add(openFileMenuItem);
          fileMenu.add(exitFileMenuItem);
  
          mbar.add(fileMenu);
          mbar.add(helpMenu);
  
          horiJPanel=new UIPanel();
          horiJPanel.setLayout(new BorderLayout());
          horiJPanel.add(right);
  
          righJPanel=new UIPanel();
          righJPanel.setLayout(new BorderLayout());
          righJPanel.add(right);
  
          downJPanel=new UIPanel();
          downJPanel.setLayout(new BorderLayout());
          downJPanel.add(right);
  
          verSplitPane= new JSplitPane(JSplitPane.VERTICAL_SPLIT, righJPanel,downJPanel);
          verSplitPane.setOneTouchExpandable(true);
          verSplitPane.setResizeWeight(0.8);
          verSplitPane.setDividerLocation(360);
  
          horiSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, horiJPanel, verSplitPane);
          horiSplitPane.setOneTouchExpandable(true);
          horiSplitPane.setResizeWeight(0.2);
          horiSplitPane.setDividerLocation(120);
  
          getContentPane().add(horiSplitPane);
  
          setResizable(false);
          setMaximizable(true);
          setIconifiable(true);
          setClosable(true);
          setDefaultCloseOperation(JInternalFrame.DISPOSE_ON_CLOSE);
          setSize(550,500);
          setLocation(280, 80);
          setVisible(true);
          setOpaque(true);
          setJMenuBar(mbar);
      }
  }
  </code></pre>