Ł
POLITECHNIKA RZESZOWSKA - Wydoal Befetrotechr*! I Informatyki
publiC void actionPerfonned(ActionEvent e) {
JFileChooser chooser = new JFileChooser(); chooser. seiCurrentDirecrtory (new File (".")); FileNameExtensionFilter filter = new // od JAVA 1.6 !!!
FileNameErtensionFilter("JPG & GIF Images", "jpg", "gif"); chooser.setFilaFiltar(filter) ; int retumVal = chooser.showOpanDialog(this);
if <retumVal = JFileChooser .APPROVE_OPTION) {//OK (YES)Open String name = chooser.getSelectedFile().getPath(); labell.setText(chooser.getSelectedFile().getName()); label2.setlcon(new Imagelcon(name));
)
iii |
rTggrm-iBiai A |
...... |
OłSEcajBUe