remove:
 int width = element.getSize().getWidth();