I would like some help on choosing or creating a layout for a component to which I will add labels at runtime. For example the component size will be 400*50 and empty when the application start up. Then some action will add a first label at position 0, the second at position first label’s width, the third at first label’s width + second label’s width and so on. A bit like the FlowLayout except that I want my labels to start at the left of the container and not in the center.
Thanks for helping.
I would like some help on choosing or creating a layout for a component
Share
Just use a
FlowLayoutand callsetAlignment(FlowLayout.LEFT);(or use one of the constructors that takes an alignment code).