Removed the todo about detecting Swing before you try and use it.