en El recpetor estaba mi error
Código:
JLabel lbl_img = new JLabel();
aunque este no tant0 ,,aka zi :
Código:
public void construyendo_img(ObjectInputStream entrada)throws IOException{
try{
byte[] bytes_img = (byte[]) entrada.readObject();
ByteArrayInputStream entrada_img = new ByteArrayInputStream(bytes_img);
BufferedImage img_bufeer = ImageIO.read(entrada_img);
//guardandola en Disco
String ruta = "c:/tu_aka.jpg";
ImageIO.write(img_bufeer, "jpg",new File(ruta));
//al recibirlo lo muestro en pantalla px xD
img = new ImageIcon(img_bufeer);
lbl_img.setIcon(img);
getContentPane().add(lbl_img);
lbl_img.setBounds(20,50,400,900);
img_bufeer.flush();
}catch(Exception e){JOptionPane.showMessageDialog(null, e.getMessage());}
}
try{
byte[] bytes_img = (byte[]) entrada.readObject();
ByteArrayInputStream entrada_img = new ByteArrayInputStream(bytes_img);
BufferedImage img_bufeer = ImageIO.read(entrada_img);
//guardandola en Disco
String ruta = "c:/tu_aka.jpg";
ImageIO.write(img_bufeer, "jpg",new File(ruta));
//al recibirlo lo muestro en pantalla px xD
img = new ImageIcon(img_bufeer);
lbl_img.setIcon(img);
getContentPane().add(lbl_img);
lbl_img.setBounds(20,50,400,900);
img_bufeer.flush();
}catch(Exception e){JOptionPane.showMessageDialog(null, e.getMessage());}
}
agrege un grande "flush()" al img_buffer

bueno aun sigo sin probarlos en dos pc reales .. per0 si dio en mi pc
.. veia como hacia todo en una pantallita de mi formulario
azi que si deve salir ..
algun alma piadosa que lo pruebe x q no tengo 2 pc :S !










Autor


En línea
