Moved call to setSwing earlier