Skip to content

Instantly share code, notes, and snippets.

@yusuke
Forked from blackraccoon000/gist:801845
Created January 29, 2011 14:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yusuke/801862 to your computer and use it in GitHub Desktop.
Save yusuke/801862 to your computer and use it in GitHub Desktop.
package frame;
import javax.swing.*;
import java.awt.*;
/**
* Created by IntelliJ IDEA.
* User: white
* Date: 11/01/29
* Time: 8:07
* To change this template use File | Settings | File Templates.
*/
public class Frame7 extends JFrame {
public static void main(String args[]){
Frame7 frame = new Frame7("icon");
frame.setVisible(true);
}
Frame7(String title){
setTitle(title);
setBounds(100,100,300,250);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
ImageIcon icon = new ImageIcon("./src/main/java/frame/d.png");
JPanel p1 = new JPanel();
p1.add(new JLabel(icon));
Container contentPane = getContentPane();
contentPane.add(p1, BorderLayout.NORTH);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment