title: Layout problems - Java
body: <p>I am using GridBagLayout in a project I've been working on, the problem is that when I compile in my computer or in others at my uni it shows properly how I want it to be.</p>
  
  <p><img src="https://i.stack.imgur.com/cJTtD.png" alt="Proper way"></p>
  
  <p>But when I run it on a different PC it is displayed different, the top-left panel and the radar panel are not like they should be.</p>
  
  <p><img src="https://i.stack.imgur.com/wheFE.png" alt="Wrong way"></p>
  
  <p>We both have the same JDK and use NetBeans 7.3, so I don't know where the problem is.</p>
  
  <p>This is the method I am using to add the panels to the frame.</p>
  
  <pre><code>private void agregarPaneles() {
  
      this.setLayout(new GridBagLayout());
      GridBagConstraints gbc = new GridBagConstraints();
      gbc.insets = new Insets(10, 10, 10, 10);
      gbc.gridx = 0;
      gbc.gridy = 0;
      gbc.gridwidth = 1;
      gbc.gridheight = 1;
      add(scrollerVuelos, gbc);
      gbc.gridx = 1;
      gbc.gridy = 0;
      gbc.gridwidth = 1;
      gbc.gridheight = 1;
      add(panelEstado, gbc);
      gbc.gridx = 2;
      gbc.gridy = 0;
      gbc.gridwidth = 1;
      gbc.gridheight = 1;
      add(panelOrdenes, gbc);
      gbc.gridx = 0;
      gbc.gridy = 1;
      gbc.gridwidth = 3;
      gbc.gridheight = 1;
      add(panelRadar, gbc);
  
  }
  </code></pre>