Hirdetés
- Luck Dragon: Asszociációs játék. :)
- sziku69: Fűzzük össze a szavakat :)
- sziku69: Szólánc.
- Sub-ZeRo: Euro Truck Simulator 2 & American Truck Simulator 1 (esetleg 2 majd, ha lesz) :)
- f(x)=exp(x): A laposföld elmebaj: Vissza a jövőbe!
- Argos: Az vagy, amit megeszel
- D1Rect: Nagy "hülyétkapokazapróktól" topik
- gban: Ingyen kellene, de tegnapra
- GAI: Retro GPU-k mindörökké: a végleges koncepció, és a szereplők bemutatása
- eBay-es kütyük kis pénzért
Új hozzászólás Aktív témák
-
n00n
őstag
A legegyszerűbb, ha ideírom a forráskódot:
class Copy extends SwingWorker<Void, Void> {
private File selectedfile = new File("D:/Adatok/proba.file");
private File chosenDestination = new File("D:/Adatok/ide/proba.file");
@Override
protected Void doInBackground() throws Exception {
try {
FileInputStream fileInputStream = new FileInputStream(
selectedfile);
BufferedInputStream bufferedInputStream = new BufferedInputStream(
fileInputStream);
ProgressMonitorInputStream progressMonitorInputStream;
UIManager.put("ProgressMonitor.progressText", "Mentés másolása");
UIManager.put("OptionPane.cancelButtonText", "Mégse");
progressMonitorInputStream = new ProgressMonitorInputStream(MentesPanel.this, "Fájl másolása folyamatban", bufferedInputStream);
File outputFile = new File("" + chosenDestination);
FileOutputStream fileOutputStream = new FileOutputStream(
outputFile);
BufferedOutputStream bufferedOutputStream = new BufferedOutputStream(
fileOutputStream);
int data;
byte[] buffer = new byte[1024];
while ((data = progressMonitorInputStream.read(buffer)) > 0) {
bufferedOutputStream.write(buffer);
}
bufferedOutputStream.close();
progressMonitorInputStream.close();
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
return null;
}
@Override
public void done() {
JOptionPane.showMessageDialog(MentesPanel.this, "A mentés másolása befejeződött!", "Kész", 1);
}
}
}
Új hozzászólás Aktív témák
A topicot kiemeltem. Valaki nem akar egy nyitó hsz-t írni?:))
- Apple Watch Series 9 41mm okosóra Silver S/M Kék szíjjal
- Asus TUF A17 Gamer Laptop 17.3" 144 hz Ryzen 7 7735HS 16 GB RAM RTX 4060 512 GB SSD Garanciával
- MSI Claw A1M Hordozható játékkonzol garanciával.
- Asus ROG Ally Z1 Extreme hordozható játékkonzol dokkolóval, garanciával
- Asztali PC , i7 6700K , RTX 2060 , 16GB DDR4 , 256GB m.2 , 500GB HDD
- HIBÁTLAN iPhone 13 mini 128GB Starlight -1 ÉV GARANCIA - Kártyafüggetlen, MS3289
- 8 GB-os Quadro RTX 4000 kártyák - garanciával
- AKCIÓ! HP Elitebook 840 G11 üzleti notebook- Intel Core Ultra 5 135U 16GB DDR5 RAM 256GB SSD W11
- Lenovo LEGION Pro 5 / Pro 7, Lenovo Yoga Pro gépek (RTX 4060 / 4070 / 4080 / 4090)
- Bomba ár! Fujitsu LifeBook E744 - i5-4GEN I 8GB I 256SSD I 14" HD+ I DP I Cam I W10 I Garancia!
Állásajánlatok
Cég: CAMERA-PRO Hungary Kft.
Város: Budapest
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest

