Bug 22970 - Missing method to replace the default AWT toolkit
Summary: Missing method to replace the default AWT toolkit
Status: RESOLVED INVALID
Alias: None
Product: classpath
Classification: Unclassified
Component: awt (show other bugs)
Version: unspecified
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-02 11:39 UTC by from-classpath
Modified: 2005-08-21 04:20 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description from-classpath 2005-06-02 11:39:31 UTC
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;
  }
Comment 1 from-classpath 2005-06-05 19:48:11 UTC
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?
Comment 2 Thomas Fitzsimmons 2005-08-21 04:20:23 UTC
No, we can't add public or protected methods to classes in the standard Java
namespaces.  Closing as invalid.