| javax.swing.JButton com.blogofbug.swing.components.ImageLabel
ImageLabel | public class ImageLabel extends JButton (Code) | | A simple component that scales an image to fit inside the size of the component.
author: nigel |
imageIcon | protected ImageIcon imageIcon(Code) | | The image that ends up getting scaled
|
ImageLabel | public ImageLabel(ImageIcon icon, String name)(Code) | | Creates a new instance of ImageLabel. The prefered width and height will
be set to the dimensions of the image
Parameters: icon - The image to display |
ImageLabel | public ImageLabel(ImageIcon icon, int width, int height, String name)(Code) | | Creates a new instance of ImageLabel, setting the preferred rendering size to
the supplied dimensions
Parameters: icon - The image to place on the label Parameters: width - The prefered width Parameters: height - The prefered height |
paintComponent | public void paintComponent(Graphics graphics)(Code) | | Paints the label scaling the image to the appropriate size
Parameters: graphics - The graphics context |
|
|