codice:
JFileChooser chooser = new JFileChooser();
chooser.showOpenDialog(this);
// Perchè crei un oggetto ToolKit?? Ce n'è già uno fornito di default... ti basta quello
Toolkit t = new HToolkit();
// Perchè "Object"? getSelectedFile() restituisce un oggetto "File"
Object f = chooser.getSelectedFile();
// Perchè un cast a String... f è un oggetto "File", non un oggetto "String"
Image g = t.getImage((String) f);
Molto, molto, molto banalmente (e di esempi così ne trovi a centinaia con Google):
codice:
JFileChooser chooser = new JFileChooser();
chooser.showOpenDialog(this);
// Ottengo il File selezionato
File f = chooser.getSelectedFile();
// Ottengo il percorso del file come stringa
String imgPath = f.getAbsolutePath();
// Creo l'ImageIcon
ImageIcon icon = new ImageIcon( imgPath );
// Setto l'icona alla JLabel
jLabel1.setIcon( icon );
Ciao.