Created
March 21, 2011 12:42
-
-
Save jonbca/879392 to your computer and use it in GitHub Desktop.
Anonymous Inner Class example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.swing.*; | |
import java.security.* | |
class InnerClassStupidity { | |
void someAction() { | |
AccessController.doPrivileged( new PrivilegedAction() { | |
public Object run() { | |
SwingUtilities.invokeLater( new Runnable() { | |
public void run() { | |
// some privileged action here | |
} | |
}); | |
} | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment