je voudrais que l'image quii correspond a fc.getSelectedFile().getName() s'affiche dans ma fenetre
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 class Ecouteur1 implements ActionListener{ public void actionPerformed(ActionEvent e) { JFileChooser fc = new JFileChooser(); int returnVal = fc.showSaveDialog (fen01.this); if(returnVal == JFileChooser.APPROVE_OPTION){ fc.getSelectedFile().getName(); } image = new JLabel(new ImageIcon(fc.getSelectedFile().getName())); } }
Il me manque quoi?
Partager