Button components order

HI, I try to add “NEXT” Button to view and seems working fine then i want to add image to right from the text like “arrow” “>>” or some point of that, if i do with code:

nextButton.setIcon(new ThemeResource("images/arrow.svg"))

then anyway it apears on left from the text looks like: “>> NEXT” but i need “NEXT >>”
is there possible solutions to configure button painter? thx!

Hi Slava,

in case you use Vaadin 7.3 or higher with the Valo theme you can do the following:

        Button nextButton = new Button("Next");
        nextButton.setIcon(FontAwesome.ARROW_RIGHT); //replace with your icon



thx, but that code will not change the order of button comonenets, so yes icoin is alinged to right but now text is overlapping on it

Hey Slava,

Did you get this problem fixed? JohannesL’s suggestion above should work as intended.

Could you maybe provide a screenshot and a demoable example?