largeicontest.java
来自「《SWING HACKS》源码 作者: Joshua Marinacci,Ch」· Java 代码 · 共 26 行
JAVA
26 行
import javax.swing.*;import java.io.*;public class LargeIconTest { public static void main(String[] args) throws Exception { // 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(); }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?