public interface

Icon

javax.swing.Icon
Known Indirect Subclasses

Class Overview

A small fixed size picture, typically used to decorate components.

See Also

Summary

Public Methods
abstract int getIconHeight()
Returns the icon's height.
abstract int getIconWidth()
Returns the icon's width.
abstract void paintIcon(Component c, Graphics g, int x, int y)
Draw the icon at the specified location.

Public Methods

public abstract int getIconHeight ()

Returns the icon's height.

Returns
  • an int specifying the fixed height of the icon.

public abstract int getIconWidth ()

Returns the icon's width.

Returns
  • an int specifying the fixed width of the icon.

public abstract void paintIcon (Component c, Graphics g, int x, int y)

Draw the icon at the specified location. Icon implementations may use the Component argument to get properties useful for painting, e.g. the foreground or background color.