title: JSplitPane resetting divider positions
body: <p>I've got two JSplitPanes like so</p>
  
  <pre><code>splitPaneRight = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, console, tabPager);
  splitPaneLeft = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, infoPanel, splitPaneRight);
  
  splitPaneRight.setResizeWeight(1);
  </code></pre>
  
  <p>and a method that goes as following and is normally called by a click on a JMenuItem somewhere else:</p>
  
  <pre><code>public void resetLayout()
  {
      setSize(1280, 720);
      splitPaneLeft.setDividerLocation(165);
      splitPaneRight.setDividerLocation(830);
  }
  </code></pre>
  
  <p>The interface looks like this (clickable thumbnail):</p>
  
  <p><a href="http://bit-stab.com/pictures/dump/MinecraftRemoteAdmin.jpg" rel="nofollow noreferrer">Main user interface http://bit-stab.com/pictures/dump/MinecraftRemoteAdmin_thumb.jpg</a></p>
  
  <p>my problem is, whenever I move the position of both divider I have to press that menu item twice before both dividers are back in place. The left one always goes on the first time, and the right on the second.</p>
  
  <p>I have tried changing the order in which the dividers are set (right first, then left). I've tried invalidating, the splitpane of the changed divider, both splitpanes, and both splitpanes plus the UI (extends JFrame)</p>
  
  <p>I've also tried running the method twice when the menu item is pressed. Or checking if getDividerLocation() returns the value that I've just set (which it does for some weird reason).</p>
  
  <p>And last but not least, I've tried combinations of all of the above.</p>
  
  <p>I'm running out of ideas, does there exist a working fix for this?</p>
  
  <p>EDIT: I've created a runnable example (source: <a href="http://pastebin.com/VKtN6zJZ" rel="nofollow noreferrer">http://pastebin.com/VKtN6zJZ</a>), <a href="http://bit-stab.com/pictures/dump/JSplitPane_Problem_Example.jar" rel="nofollow noreferrer">download.jar</a></p>