-
-
Save yusuke/801862 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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