国产gaysexchina男同gay,japanrcep老熟妇乱子伦视频,吃奶呻吟打开双腿做受动态图,成人色网站,国产av一区二区三区最新精品

App下載
首頁javajframeJava Swing - 如何更改JFrame中的圖標(biāo)

Java Swing - 如何更改JFrame中的圖標(biāo)

我們想知道如何更改JFrame中的圖標(biāo)。
import java.awt.Image;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;

import javax.imageio.ImageIO;
import javax.swing.JFrame;

public class Main {

  public static void main(String[] args) throws Exception {
    URL url16 = new URL("http://www.yjpub.cn/style/download.png");
    URL url32 = new URL("http://www.yjpub.cn/style/download.png");

    final List<Image> icons = new ArrayList<Image>();
    icons.add(ImageIO.read(url16));
    icons.add(ImageIO.read(url32));

    JFrame f = new JFrame();
    f.setIconImages(icons); 
    f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

    f.setSize(200, 100);
    f.setVisible(true);
  }
}