void (MouseEvent event) { if (SwingUtilities.isLeftMouseButton(event)) { if (myFileChooser == null) { myFileChooser = new JFileChooser(); myFileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY); myFileChooser.setMultiSelectionEnabled(false); } File file = JFileChooser.APPROVE_OPTION != myFileChooser.showOpenDialog(myView) ? null : myFileChooser.getSelectedFile(); if (file != null) { try { myView.setImage(ImageIO.read(file)); } catch (Exception exception) { myView.setImage(null); } } } }