I am using BoxLayout to layout 3 components in a row horizontally - two JLists (J1 and J2) and a JPanel in between (X).
---------------
|             |
|             |
|  J1  X  J2  |
|             |
|             |
---------------
The problem I am having is that BoxLayout is making each column equal size, but what I want is for X to be its smallest size and J1 and J2 to take up all the available horizontal space. How can I do this? Basically, the look I am going for is something like this.

 
     
     
     
     
    