How could I implement a system where I could have a dialog for the user of a computer while in the context of a SecurityManager in Java? When I attempted to do this I caused a stack overflow with an infinite loop from the Swing code calling the SecurityManager. The point of making this is to have a modding API for games that would allow a more Android-esk permissions system. The hope is to prevent stuff like the Minecraft mod malware that is out there. I know that it won't stop it, but it would help slow it down some.