Once a toolkit is instantiated, it is kept in java.awt.Toolkit#toolkit, but there is no way to flush this value. Please add the following method: protected static void clearDefaultToolkit() { toolkit = null; }
Could you please specify a use-case[1] for this functionality? Even though we cannot add protected methods to this class, we could find some other way of clearing the variable. [1] I'm assuming you want to be able to reinit the AWT for running several apps with the same, recycled, JVM instance?
No, we can't add public or protected methods to classes in the standard Java namespaces. Closing as invalid.