• Welcome to Test Foro de elhacker.net SMF 2.1.
 
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - KidJoe

#1
Mi problema es que abro un Formulario de busqueda, doy los resultados y en los resultados tengo que seleccionar una imagen del resultado que deseo y visualizarlo en un JPanel en el visor principal

Code (java) Select
private void bVerDocActionPerformed(java.awt.event.ActionEvent evt) {                                        
       // TODO add your handling code here:

       this.setVisible(false);
       if(lResultados.getSelectedIndex()==0){
        fc.setFileFilter(new FileNameExtensionFilter("Archivos de imagen", "jpg", "jpeg", "png", "gif"));
        int opcion = fc.showDialog(this, "Abrir");
       if (opcion == JFileChooser.APPROVE_OPTION)
       {
          File file = fc.getSelectedFile();
        //
        //Aqui intento crear un obeto del menu principal para poner la imagen
         objMN.mostrarImagen2(file);
          objMN.cargaDirectorio(file.getParent(),new MenuPrincipal());
       }
       }
     //  VP.PrepararPagina(this);
      // new MenuPrincipal(lResultados.getSelectedIndex(),1);
   }