List of usage examples for java.awt Frame setIconImage
public void setIconImage(Image image)
From source file:FrameIcon.java
/** Demo main program, showing two ways to use it. * Create a small MemImage and set it as this Frame's iconImage. * Also display a larger version of the same image in the Frame. *//*from ww w . j a v a 2 s . c om*/ public static void main(String[] av) { Frame f = new Frame("FrameIcon"); Image im = Toolkit.getDefaultToolkit().getImage("java2s.gif"); f.setIconImage(im); f.setSize(100, 100); f.setLocation(200, 200); f.setVisible(true); }
From source file:MemImage.java
/** * Demo main program, showing two ways to use it. Create a small MemImage * and set it as this Frame's iconImage. Also display a larger version of * the same image in the Frame.// w w w . j a va 2 s . c o m */ public static void main(String[] av) { Frame f = new Frame("MemImage.java"); f.add(new MemImage()); f.setIconImage(new MemImage(16, 16).getImage()); f.pack(); f.setVisible(true); }