JDK-4115928 : createImage shouldn't just return null when peer isn't created.
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.1.2fcs,1.1.4,1.1.5
  • Priority: P4
  • Status: Closed
  • Resolution: Won't Fix
  • OS: generic,other,windows_nt
  • CPU: generic,other,x86
  • Submitted: 1998-02-27
  • Updated: 2001-07-11
  • Resolved: 2001-07-11
Related Reports
Duplicate :  
Description
createImage(int width, int height) returns null if the peer isn't created
yet.  Can't it be smarter and create the peer if it doesn't exist yet?  A
programmer shouldn't have to worry about when to call this method.
This is related to Hotjava Browser bug #4102694.

Comments
EVALUATION 5/19/2000 kevin.ryan@eng -- might be considered EOU. Still present in 1.3.0-C and 1.1.8_003. ===== Over the last few years, we have very clearly stated to developers that the only way to create a peer is to call one of the following: setVisible(true) show() pack() addNotify() (but applications should not call this method) It is important that developers are aware of the exact set of methods which create a peer because creating a peer initializes the Toolkit, which in turn creates the AWT EventDispatchThread. In a Swing application, once this thread is created, all UI operations must be performed on that thread. If we change the time at which the Toolkit is initialized, we could potentially break existing Swing applications. Also, adopting this RFE would break precedent, and we would have to consider implicit peer creation for other methods as well. Closing as Will not Fix. david.mendenhall@east 2001-07-11
11-07-2001