我想添加一个ImageIcon
或类似于JInternalFrame
的标题栏,使得[x]图标位于最东侧,可图标图标位于第二个最东侧,自定义图标位于第三个最东侧。这可行吗?
这对我有用:
ImageIcon icon = new ImageIcon(ClassLoader.getSystemResource("Iconos/icono.png"));
this.setFrameIcon(icon);
JInternalFrame jInternalFrame1 = new JInternalFrame("Test Internal Frame",false,false,false,false);
try {
URL url = new URL("images/icon.gif");
ImageIcon icon = new ImageIcon(url);
jInternalFrame1.setFrameIcon(icon);
}
catch (MalformedURLException ex)
{
//whatever you want to put here
}
for parent for parent frame:// parent is container jDesktopPane - > parent = new JFrame()
this.setFrameIcon(new javax.swing.ImageIcon(this.parent.getIconImage()));