@Override
public void actionPerformed(ActionEvent e) {
JFileChooser imageChooser = new JFileChooser();
imageChooser.setFileFilter(new ImageFilter());
imageChooser.setAccessory(new ImagePreview(imageChooser));
int ret = imageChooser.showOpenDialog(HTMLTextEditor.this);
if (ret == JFileChooser.APPROVE_OPTION) {
File f = imageChooser.getSelectedFile();
String str = null;
try {