1. sayfa
JFileChooser resimsecme = new JFileChooser(); resimsecme.showOpenDialog(resimsecme); File f = resimsecme.getSelectedFile(); String tampath = f.getAbsolutePath(); System.out.println(tampath);
JFileChooser resimsecme = new JFileChooser(); resimsecme.showOpenDialog(resimsecme); File f = resimsecme.getSelectedFile(); String resimadi = resimsecme.getName(); String tampath = f.getAbsolutePath(); String adres = "D:\\mesajresim\\" + resimadi; System.out.println(tampath); try { copyFileUsingStream(tampath, adres); } catch (IOException e1) { // TODO Auto-generated catch block e1.printStackTrace(); }
arkadaşlar java'da bir dosyayı (resmi) kopyalayıp başka bir yere yapıştırmak istiyorum.
Şöyle bir kod yazdım :
Ama bundan sonrası ne olmalı bilmiyorum. İnternetten bir kaç örnek buldum denedim. Ama resmi tam olarak aktaramadım.
Bunu nasıl yapabilirim?
Yardımınıza ihtiyacım var.