The setWidth, setHeight methods ARE in the SVN version of Nifty. It's a recent addition that has not made the JME build yet. To get the needed methods, you would need to check out the source from the SVN and work from there.
Yes, setWidth() and setHeight() methods require the SVN version of Nifty.
They need to be used with care tho because they don't automatically adjust the layout of any child (or in some cases parent) panels.
The setConstraintWidth() method can do that but it needs a manual call to element.layoutElements() (to only relayout the element) or better yet screen.layoutLayers() to relayout the whole screen.
This is because when you dynamically change element sizes (or sometimes positions) other elements could be influenced.
I think that last call might be the one you were missing.
Hope that helps,
it works now
thank you both of you (Tumaini and Void)