How to use public void render(@Nonnull Element elmnt, @Nonnull NiftyRenderEngine nre) of PanelRenderer.class

Hi I want to change the width of Panel`s with java code from nifty screen xml. I tried this

Element tmpElement = currentScreen.findElementById("_border1");
tmpElement.setWidth(600);
                            
currentScreen.findElementById("_border1").getRenderer(PanelRenderer.class).render(tmpElement, nifty.getRenderEngine());

but this doesnt change anything.