目前在JOptionPane源代码中(实际上在其UI中),这是通过检索此属性来完成的:
return (Icon)DefaultLookup.get(optionPane, this, "OptionPane.informationIcon");
Run Code Online (Sandbox Code Playgroud)
但是,在UI代码之外,您只需要调用:
UIManager.getIcon("OptionPane.informationIcon")
Run Code Online (Sandbox Code Playgroud)
但请注意,返回的图标取决于当前的外观.
出于好奇,其他资源是: