Made GUI respond to IllegalStateException with warning dialogue.