K
K
Here is my script does anyone know why this isn't working
import javax.swing.JFrame;
import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.Continer;
class Jframe {
public static void main(String[] args) {
JFrame frame = new JFrame();
ImageIcon icon = new ImageIcon(puffin.jpg);
JLabel label = new JLable (icon);
Container contentPane = frame.getContentPane();
contentPane.add(label);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.pack();
frame.setVisible(true);
}
}
import javax.swing.JFrame;
import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.Continer;
class Jframe {
public static void main(String[] args) {
JFrame frame = new JFrame();
ImageIcon icon = new ImageIcon(puffin.jpg);
JLabel label = new JLable (icon);
Container contentPane = frame.getContentPane();
contentPane.add(label);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.pack();
frame.setVisible(true);
}
}