If you retrieve the existing preferred size from gold here you can just set the width property and pass it to setPreferredSize without relying on the height of the wounds spinner