Example usage for javax.swing.plaf.metal MetalIconFactory getTreeHardDriveIcon

List of usage examples for javax.swing.plaf.metal MetalIconFactory getTreeHardDriveIcon

Introduction

In this page you can find the example usage for javax.swing.plaf.metal MetalIconFactory getTreeHardDriveIcon.

Prototype

public static Icon getTreeHardDriveIcon() 

Source Link

Document

Returns the instance of TreeHardDriveIcon .

Usage

From source file:SysTray.java

private Image getImage() throws HeadlessException {
    Icon defaultIcon = MetalIconFactory.getTreeHardDriveIcon();
    Image img = new BufferedImage(defaultIcon.getIconWidth(), defaultIcon.getIconHeight(),
            BufferedImage.TYPE_4BYTE_ABGR);
    defaultIcon.paintIcon(new Panel(), img.getGraphics(), 0, 0);
    return img;/*  ww  w.  j  a  v  a2s . c om*/
}