当前位置: 技术问答>java相关
java开发的windows程序,窗口左上角的java标志"小咖啡杯"怎样换成别的图片?
来源: 互联网 发布时间:2015-01-03
本文导语: | 看看下面的例子: import java.awt.*; import javax.swing.*; class window { public static void main(String[] args) { ImageIcon icon = new ImageIcon("xieli.gif"); Image image = icon.getImage(); Frame win= new Frame(); ...
|
看看下面的例子:
import java.awt.*;
import javax.swing.*;
class window
{
public static void main(String[] args)
{
ImageIcon icon = new ImageIcon("xieli.gif");
Image image = icon.getImage();
Frame win= new Frame();
win.setIconImage(image);
win.setTitle("This is the First window application");
win.setBounds(100,100,300,300);
win.show();
}
}
import java.awt.*;
import javax.swing.*;
class window
{
public static void main(String[] args)
{
ImageIcon icon = new ImageIcon("xieli.gif");
Image image = icon.getImage();
Frame win= new Frame();
win.setIconImage(image);
win.setTitle("This is the First window application");
win.setBounds(100,100,300,300);
win.show();
}
}