How to force repaint after setVisible(true)


I have some items in a FormLayout which are .setVisible(false) on creation.
When they receive a .setVisible(true), they are not responsive, i.e.: fields are too big and overflow the FormLayout, without following the .setResponsiveSteps() indications. I have to resize the window manually in order for them to be repainted properly.

I guess it is due to the components being invisible on creation, thus they don’t need any size calculation; but they should receive one when they become visible again.

Anyway, is there some kind of .repaint() method to execute manually on components when I resize the window?


Hey Sir, you can provide a example about your are doing :),

Hi Marco,

Which version are you on? I reported two visibility issues to Vaadin and they have been corrected in the latest releases of V13 and (supposedly) V14RC.


Hi Martin,

I’m on 14.0.0rc6.

Thanks for your bug report, which seem to describe my issue, which is not solved by the latest (2.1.3) vaadin-form-layout and can only be circumvented by manually calling updateStyles.