Java Code Examples for java.awt.Toolkit#checkImage()
The following examples show how to use
java.awt.Toolkit#checkImage() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MultiResolutionImageTest.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
static void testImageLoaded(Image image) { Toolkit toolkit = Toolkit.getDefaultToolkit(); int flags = toolkit.checkImage(image, IMAGE_WIDTH, IMAGE_WIDTH, new SilentImageObserver()); if ((flags & (ImageObserver.FRAMEBITS | ImageObserver.ALLBITS)) == 0) { throw new RuntimeException("Image is not loaded!"); } }
Example 2
Source File: MultiResolutionImageTest.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
static void testImageLoaded(Image image) { Toolkit toolkit = Toolkit.getDefaultToolkit(); int flags = toolkit.checkImage(image, IMAGE_WIDTH, IMAGE_WIDTH, new SilentImageObserver()); if ((flags & (ImageObserver.FRAMEBITS | ImageObserver.ALLBITS)) == 0) { throw new RuntimeException("Image is not loaded!"); } }