title: JDesktopPane and BorderLayout
body: <p>I am writing a program that attempts to simulate the evolution of a species, and it has a window that looks like this:
  <img src="https://i.stack.imgur.com/YzUkG.png" alt="enter image description here"></p>
  
  <p>Originally the empty area in the bottom right was a Panel, and it is intended to draw a visual representation of the specimens, locations, and travel paths(doesn't really matter).  However, you will be able to open some sort of window that allows you to create/edit different items(like species, locations, and travel paths).  Originally I planned for those to simply be popup windows.  But, I was thinking I would perhaps use JInternal panes for the popups, and the visual representation screen.</p>
  
  <p>So in my JFrames constructor:</p>
  
  <pre><code>JDesktopPane pane = new JDesktopPane();
  this.setContentPane(pane);
  setLayout(new BorderLayout());//To layout the menubar, and the items on the left
  
  panel = new GraphicsPanel(manager);
  panel.setVisible(true);
  </code></pre>
  
  <p>And in Graphics Panel constructor:<code>super("Graphic Project View",true,false,true,true);</code></p>
  
  <p>This locks the Panel to BorderLayout.CENTER, and it fills up the entire space, not allowing for anything else.  My guess this is because JDesktopPanes use an OverlayLayout, and when I set the layout to BorderLayout that overrides the OverlayLayout, and so my InternalFrame just gets added to the center.</p>
  
  <p>So the question is:
  How do I layout the things like the JMenuBar, and the left ward Panel as they are now, whilst still maintaining the capability to have JInternalFrames?</p>
  
  <p>For now I am going to add the JMenuBar via JFrame.setJMenuBar(JMenuBar) instead of JFrame.add(menuBar,BorderLayout.NORTH), and then change the panel on the left into a JInternal frame, but if possible I'd rather have it as is.  I would like it if I could just have the DesktopPane be added to the JFrame at BorderLayout.CENTER, and then just add the frame to the Desktop pane.  If the InternalFrame were limited to that region I wouldn't care, as long as it's still mobile, ect.</p>
  
  <p><strong>EDIT:</strong> How I add JInternalFrame(Sorry it still says panel, but it has been converted to a JInternalFrame):</p>
  
  <pre><code>panel = new GraphicsPanel(manager);
  panel.setSize(desktop.getSize());
  panel.setLocation(0,0);
  panel.setVisible(true);
  desktop.add(panel);
  </code></pre>