5

[x]アイコンが最も東に、アイコン化可能なアイコンが2番目に東に、カスタムアイコンが3番目に東になるように、のタイトルバーImageIconまたはそれに相当するものを追加したいと思います。JInternalFrameこれは実行可能ですか?

4

3 に答える 3

0

これは私のために働いた:

ImageIcon icon = new ImageIcon(ClassLoader.getSystemResource("Iconos/icono.png"));
this.setFrameIcon(icon);
于 2016-10-13T16:10:15.200 に答える
-1
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
}
于 2011-08-05T23:58:34.153 に答える
-1

for gets for parent frame : // 親はコンテナ jDesktopPane -> parent = new JFrame ()

this.setFrameIcon(new javax.swing.ImageIcon(this.parent.getIconImage()));
于 2017-01-30T21:27:55.507 に答える