Thanks Nate.
Late last night I also got it working but thanks for the scroll tip.
For other newbies, here's the code:
This will on pressing a button, popup an image in the JLabel field and also
pop an image up in a frame.
void jButton1_actionPerformed(ActionEvent e)
{
Image image = null;
ImageIcon icon=new ImageIcon
(Toolkit.getDefaultToolkit().createImage("C:\\FILES\\finger1.jpg"));
jLabel1.setIcon(icon);
this.repaint();
Image image1 = null;
try {
// Read from a file
File file = new File("C:\\FILES\\martian_girlfriend.jpg");
image1 = ImageIO.read(file);
} catch (IOException ee) {
}
// Use a label to display the image
JFrame frame = new JFrame();
JLabel label = new JLabel(new ImageIcon(image1));
frame.getContentPane().add(label, BorderLayout.CENTER);
frame.pack();
frame.setVisible(true);
}
}
