I have the following problem:
I added a GIF image to a ContentPanel to symbolize the loading of the response from tomcat server that I sent the request via a button.
The first time I send the request, the GIF image is decentralized, but the second time then it centralizes perfectly. This is the code:

Code:
ContentPaneltest.removeAll();
ContentPaneltest.layout();
                
LayoutContainer c = new LayoutContainer();  
VBoxLayout layout = new VBoxLayout();  
layout.setVBoxLayoutAlign(VBoxLayoutAlign.CENTER);  
layout.setPack(BoxLayoutPack.CENTER);
c.setLayout(layout);
                
Image test = new Image(Utils.URL_LOADING);
c.add(test); 
                
ContentPaneltest.add(c);
ContentPanel is initialized with the previously FitLayout.
What's wrong?