Public Image getImage() Returns the Icon's Image Returns: the loading status as defined by. Public int getImageLoadStatus() Returns the status of the image loading operation. Protected void loadImage( Image image) Wait for the image to load Public ImageIcon() Creates an uninitialized image icon. Parameters: an - array of pixels in an image format supported by The byte array may also be statically stored in a class. Public ImageIcon(byte imageData) Creates an ImageIcon from an array of bytes which were description - a brief textual description of the image See Also: Toolkit.createImage() Parameters: imageData - an array of pixels in an image format supportedīy the AWT Toolkit, such as GIF or JPEG. Normally this array is createdīy reading an image using Class.getResourceAsStream(), but String description) Creates an ImageIcon from an array of bytes which were Public ImageIcon( Image image) Creates an ImageIcon from an image object. Parameters: image - the image description - a brief textual description of the image String description) Creates an ImageIcon from the image. Public ImageIcon( URL location) Creates an ImageIcon from the specified URL. Parameters: URL - the URL for the image description - a brief textual description of the image See Also: ImageIcon(String) The image willīe preloaded by using MediaTracker to monitor the loaded state String description) Creates an ImageIcon from the specified URL. On all systems.) Parameters: filename - a String specifying a filename or path (The string is converted to an URL, so the forward-slash works When specifying a path, use the Internet-standardįorward-slash ("/") as a separator. The specified String can be a file name or aįile path. Public ImageIcon( String filename) Creates an ImageIcon from the specified file. Parameters: filename - the name of the file containing the image description - a brief textual description of the image See Also: ImageIcon(String) The image willīe preloaded by using MediaTracker to monitor the loading state String description) Creates an ImageIcon from the specified file. Protected static final MediaTracker tracker Constructor Detail Protected static final Component component SetImageObserver( ImageObserver observer) Returns the status of the image loading operation. Read from an image file containing a supported image format,Ĭreates an ImageIcon from an image object.Ĭreates an ImageIcon from the specified file.Ĭreates an ImageIcon from the specified URL. A future release of Swing will provide support forĬreates an ImageIcon from an array of bytes which were The current serialization support is appropriateįor short term storage or RMI between applications running the same Serialized objects of this class will not be compatible withįuture Swing releases. Images that are created from a URL or filenameĪre preloaded using MediaTracker to monitor the loaded state Public class ImageIcon extends Object implements Icon, SerializableĪn implementation of the Icon interface that paints Iconsįrom Images. Java(TM) 2 Platform, Standard Edition, v1.2.2 API Specification: Class ImageIcon
0 Comments
Leave a Reply. |