Empty JPanel not positioning correctly in relation to other JPanels

I am using swing to build a GUI with 4 JPanels inside a JPanel using the BorderLayout manager:

  1. A row of labels
  2. A column of JButtons
  3. A display area (it is a class that extends JPanel and has nothing added to it and is used as a drawing area)
  4. Another column of buttons

My code looks like this:

    JPanel middle = new JPanel();
    middle.setLayout(new BorderLayout());

The simulation panel is just an extended JPanel that overrides paintComponent to draw an image. The problem is, the simulation area is on the left and not in the middle:

The wrong layout

What I actually want is:

enter image description here

Edit, here is an example, do I need to use a different layout manager to get the empty JPanel positioned correctly?:

import java.awt.*;
import javax.swing.*;
public class Test extends JFrame {  
    final static int MAXFLOORS = 8;
    public Test() {
        setLayout(new BorderLayout());
        setSize(500, 500);

        JPanel simulation = new JPanel();
        JPanel dropButtons = new JPanel();
        JPanel pickupButtons = new JPanel();

        pickupButtons.setLayout(new GridLayout(MAXFLOORS, 1));
        dropButtons.setLayout(new GridLayout(MAXFLOORS, 1));
        setLayout(new BorderLayout());      

        for (int i = MAXFLOORS; i != 0; i--) {
            JButton pb = new JButton("F" + i);

            JButton db = new JButton("F" + i);
    public static void main(String[] args) {
        new Test();

Possible Duplicate: Update more than one row atomically I have a set of data-chunks stored in a noSQL database. To update the data I need to: fetch (get) update data write (put) (no direct ...

I'm trying to build an HTTP request manually (as a string) and send it over a TCP socket, this is what I'm trying to do: import java.io.BufferedReader; import java.io.IOException; import java.io....

I have a BasicNetwork that I will use in ensemble learning. I appreciate Encog's multithreaded training that it uses by default for neural networks, but how can I configure the network or the trainer ...

I want to use reference in Java but I don't know how! for example in C++ we write: void sum(int& x) { ... } but in Java & sign is a compiler error! please help me to understand ...