public static Image getImage ( String fullImageName ) { Image image = null ; java . net . URL url = cl . getResource ( fullImageName ) ; if ( url != null ) image = Toolkit . getDefaultToolkit ( ) . createImage ( url ) ; if ( image == null ) System . out . println ( " ERROR: Resource.getImageResource failed on " + fullImageName ) ; return image ; }
Get a gif file make it into an Image .