I need to put n(10 for instance, the actual number depends on some circumstances) JLabel in a JPanel in a row. Those JLabels should have size 50x50. What layout should I select? As said in this answer we should avoid using setXxxSize(...).
Here is what I'm trying to get:

