I have a weird problem that I can't seem to solve. I've got a `JList` which has to be able to scroll if there are more items in it then can be displayed. However if I put the `JList` in a `JScrollPane`, it doesn't utilise the full height of the `EAST` part of the `BorderLayout` it's in.

Example without `JScrollPane`:

```
public UsersPanel(){
    String[] userList = new String[]{"Foo","Bar","Foo","Bar","Foo","Bar","Foo","Bar","Foo","Bar","Foo","Bar","Foo","Bar"};
    JList users = new JList(userList);
    add(users);
}

```

![Example without JScrollPane](https://i.stack.imgur.com/0F3iQ.jpg)

Example with `JScrollPane`:

```
public UsersPanel(){
    String[] userList = new String[]{"Foo","Bar","Foo","Bar","Foo","Bar","Foo","Bar","Foo","Bar","Foo","Bar","Foo","Bar"};
    JList users = new JList(userList);

    JScrollPane sp = new JScrollPane(users);

    add(sp);
}

```

![Example with JScrollPane](https://i.stack.imgur.com/Eke3X.jpg)

I want a `JList` that utilises the full available height of the EAST part of the `BorderLayout` it's in. I've tried wrapping my `JList` inside another `JPanel`, but that doesn't solve my problem either.