FileDocCategorySizeDatePackage
LargeIconTest.javaAPI DocExample675Mon Jan 09 11:02:02 GMT 2006None

LargeIconTest

public class LargeIconTest extends Object

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] args)


        // Create a File instance of an existing file
        File file = new File(args[0]);
        
        // Get large icon
        sun.awt.shell.ShellFolder sf = sun.awt.shell.ShellFolder.getShellFolder(file);
        Icon icon = new ImageIcon(sf.getIcon(true));
        System.out.println("type = " + sf.getFolderType());
        
        // show the icon
        JLabel label = new JLabel(icon);
        JFrame frame = new JFrame();
        frame.getContentPane().add(label);
        frame.pack();
        frame.show();