Say I have a GridLayout in a JPanel, if my layout isn't big enought to fill the whole JPanel, it will auto align it at the center of ther JPanel like:  

[![enter image description here](https://i.stack.imgur.com/J9m1b.png)](https://i.stack.imgur.com/J9m1b.png)

But I want my layout to align it on top left of the JPanel like:  

[![enter image description here](https://i.stack.imgur.com/lesmG.png)](https://i.stack.imgur.com/lesmG.png)

so my component will start on top left of the panel, is there any method to do it?