private JPanel thumbnails(final String path) {
        final JPanel thumb = new JPanel();
        
        
        thumb.addMouseListener(new MouseListener() {

            @Override
            public void mouseClicked(MouseEvent e) {
               
                for(int i=0;i<6;i++){
                    if(pnlImagensCarregadas.getComponent(i) instanceof JPanel){
                        ((JPanel)pnlImagensCarregadas.getComponent(i)).setBorder(BorderFactory.createEmptyBorder());
                    }
                   
                }
                 imagemSelecionada=new File(path);
                 
                 thumb.setBorder(BorderFactory.createLineBorder(Color.RED, 2));
            }

            @Override
            public void mousePressed(MouseEvent e) {
                //throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
            }

            @Override
            public void mouseReleased(MouseEvent e) {
                //throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
            }

            @Override
            public void mouseEntered(MouseEvent e) {
                setCursor(new Cursor(Cursor.HAND_CURSOR));
                //throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
            }

            @Override
            public void mouseExited(MouseEvent e) {
                 setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
                //throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
            }
        });
        thumb.setLayout(new BorderLayout());
        PnlImagem image = new PnlImagem(path, 1000, 1000);

        thumb.add(image, BorderLayout.CENTER);
        lbRemover = new JLabel(bundle.getString("remover"));
        lbRemover.addMouseListener(new MouseListener() {
            Font original;
            String nomeFicheiro;

            @Override
            public void mouseClicked(MouseEvent me) {

                for (int i = 0; i < paths.size(); i++) {
                    if (paths.get(i).equals(path)) {
                        paths.remove(i);
                        nomeFicheiro = paths.get(i).getName();
                    }
                }

                File imagemExistente = new File(path);
                
                if (path.startsWith("imagens")) {
                    if (imagemExistente.exists()) {
                        imagemExistente.delete();
                    }
                }

                pnlImagensCarregadas.remove(thumb);
                indiceImagem--;
                pnlImagensCarregadas.add(new JLabel(" "));
                imagemSelecionada=null;
                revalidate();
                repaint();
                //throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
            }

            @Override
            public void mousePressed(MouseEvent me) {
                //throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
            }

            @Override
            public void mouseReleased(MouseEvent me) {
                me.getComponent().setFont(original);
                setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
                me.getComponent().setForeground(Color.BLACK);
                //throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
            }

            @Override
            public void mouseEntered(MouseEvent me) {
                original = me.getComponent().getFont();
                Map attributes = original.getAttributes();
                attributes.put(TextAttribute.UNDERLINE, TextAttribute.UNDERLINE_ON);
                me.getComponent().setFont(original.deriveFont(attributes));
                setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
                me.getComponent().setForeground(Color.RED);
                //throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
            }

            @Override
            public void mouseExited(MouseEvent me) {
                me.getComponent().setFont(original);
                setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
                me.getComponent().setForeground(Color.BLACK);
                //throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
            }
        });
        lbRemover.setHorizontalAlignment(JLabel.CENTER);
        JPanel pnlFundo = new JPanel();
        pnlFundo.add(lbRemover);
        thumb.add(pnlFundo, BorderLayout.PAGE_END);
        return thumb;
    }