java create a frame window/**
* @author lautturi.com
* Java example: frame add ImageIcon
*/
import java.awt.FlowLayout;
import java.util.*;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JLabel;
public class Lautturi {
public static void main(String[] args) {
JFrame frame = new JFrame();
frame.setTitle("window title");
frame.setLayout(new FlowLayout());
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
ImageIcon imageIcon = new ImageIcon("icon-path");
JLabel label = new JLabel(imageIcon);
frame.add(label);
frame.pack();
frame.setVisible(true);
}
}