Gui_Show_Image.java
mport javax.swing.*;
import java.awt.*;
public class Gui_Show_Image {
    private JFrame frame;
    /**
     * Launch the application.
     */
    public static void main(String[] args) {
        EventQueue.invokeLater(new Runnable() {
            public void run() {
                try {
                    Gui_Show_Image window = new Gui_Show_Image();
                    window.frame.setVisible(true);
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
        });
    }
    public Gui_Show_Image() {
        initialize();
    }
    /**
     * Initialize the contents of the frame.
     */
    private void initialize() {
        frame = new JFrame();
        frame.setBounds(100, 100, 450, 300);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.getContentPane().setLayout(null);
        JLabel lblNewLabel = new JLabel("");
        lblNewLabel.setIcon(new ImageIcon("C:\\Users\\koinPC\\Pictures\\dance2.png "));
        lblNewLabel.setBounds(14, 0, 159, 240);
        frame.getContentPane().add(lblNewLabel);
    }
}
Recommended Posts