I don't understand how you expect this to work?
You have a button with long text that breaks lines. How do you expect this
to be centered?
If you explicitly line break with \n then there will be room for centering.
Alternatively just use a bit of margin on the side to limit the space
available
https://www.codenameone.com/javadoc/com/codename1/ui/layouts/FlowLayout.html
use the constructor with the orientation param and use CENTER
On Tue, 8 Jun 2021 at 07:26, 'P5music' via CodenameOne Discussions <
codenameone-discussions@googlegroups.com> wrote:
> Thanks
> I already tried with
Thanks
I already tried with FlowLayout and the size is correct, but the button is
on the left.
So I added the FlowLayout container to a BorderLayout in the CENTER
position, but the button still is on the left.
Regards
Il giorno martedì 8 giugno 2021 alle 00:00:58 UTC+2 javier...@gmail.com ha
Option 1. Add them to a flowlayout container and add that container to the
boxlayout.y
Option 2. Override calcPreferredSize and set them to a custom width
There are more ways
On Mon, 7 Jun 2021, 21:12 'P5music' via CodenameOne Discussions, <
codenameone-discussions@googlegroups.com> wrote:
>
There are only two Buttons with a round border over my CN1 app.
I have an issue with the two buttons. I did not realize it before because
they had no border and no bg.
I put them in a BoxLayout.y() container along with other components.
They are in different places of the vertical container but