browse.addActionListener((evt) -> {
Display.getInstance().openGallery(new ActionListener() {
public void actionPerformed(ActionEvent ev) {
if (ev != null && ev.getSource() != null) {
String chemin = (String) ev.getSource();
int index = chemin.lastIndexOf('/');
if (index > 0) {
filename = chemin.substring(index + 1);
System.out.println(filename);
try {
Image img = Image.createImage(chemin);
ImageViewer a = new ImageViewer(img);
content.add(a);
} catch (IOException ex) {
}
}
}
}
}, Display.GALLERY_IMAGE);
});
here's the code i'm having