The components inside a JPanel (which has a BoxLayout) are getting resized when there's lack of space.

The JPanel is inside a JScrollPane, but because of the fact that the components get resized, the scroll bar is useless.

The JScrollPane is also content inside a JTabbedPane by the way.

Setting a minimum size and preferred size to every component doesn't fix the problem:

```
this.setPreferredSize(new Dimension(100,20));
this.setMinimumSize(new Dimension(100,20));

```

Any idea of how to deal with this?.

Screenshot of the problem:

[![https://i.imgur.com/7Nm7k81.png](https://i.stack.imgur.com/mDPxs.png)](https://i.stack.imgur.com/mDPxs.png)

This is how I wan't it to look like, with a fixed size:

[![https://i.imgur.com/hmqFKwg.png](https://i.stack.imgur.com/G0oa2.png)](https://i.stack.imgur.com/G0oa2.png)