各位大侠,我最近在用swing开发的时候遇到一个问题,我怎么样才能获得JDialog的背景图片是否加载完成呢?请不吝赐教!谢谢!

解决方案 »

  1.   

    LZ去查API吧
    The MediaTracker class is a utility class to track the status of a number of media objects. Media objects could include audio clips as well as images, though currently only images are supported. To use a media tracker, create an instance of MediaTracker and call its addImage method for each image to be tracked. In addition, each image can be assigned a unique identifier. This identifier controls the priority order in which the images are fetched. It can also be used to identify unique subsets of the images that can be waited on independently. Images with a lower ID are loaded in preference to those with a higher ID number.