elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Curso de javascript por TickTack


  Mostrar Temas
Páginas: [1]
1  Programación / Java / Visualizar imagen en jPanel de una ventana principal en: 2 Septiembre 2010, 18:29 pm
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

 
Código
  1. private void bVerDocActionPerformed(java.awt.event.ActionEvent evt) {                                        
  2.        // TODO add your handling code here:
  3.  
  4.        this.setVisible(false);
  5.        if(lResultados.getSelectedIndex()==0){
  6.         fc.setFileFilter(new FileNameExtensionFilter("Archivos de imagen", "jpg", "jpeg", "png", "gif"));
  7.         int opcion = fc.showDialog(this, "Abrir");
  8.        if (opcion == JFileChooser.APPROVE_OPTION)
  9.        {
  10.           File file = fc.getSelectedFile();
  11.         //
  12.         //Aqui intento crear un obeto del menu principal para poner la imagen
  13.          objMN.mostrarImagen2(file);
  14.           objMN.cargaDirectorio(file.getParent(),new MenuPrincipal());
  15.        }
  16.        }
  17.      //  VP.PrepararPagina(this);
  18.       // new MenuPrincipal(lResultados.getSelectedIndex(),1);
  19.    }  
                       
Páginas: [1]
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines