fixed an error in the swing application