EVALUATION
Note that Font2DTest creates a bogus image in order to get blank cursor
(FontPanel.java, lines 495 - 498). This image can not be loaded and triggers
an error when MediaTracker tries to prepare the image. As soon as the error
is detected, the conversion of toolkit image to CImage is aborted, and the
CImage.Creator.createFromImage returns null.
CCustomCursor.getImageData has to be modified in order to be able to handle
null result of the createFormImage call.
However, in order to prevent numerous calls to createFromImage in case of faulty
image, we can check the status of image loading in the constructor, and set a flag
to indicate whether given image can be used as a cursor.
|