Hirdetés
- Olyan lesz a Térkép, mint a segítőkész haver az anyósülésen
- Alaposan kitolhatod az Steam Deck üzemidejét egy új funkcióval
- Lassú lett a PC? Micsoda meglepetés: egy Windows frissítés lehet a ludas
- PlayStation 5 nélkül kínál PlayStation 5 játékokat a Sony
- Bekrepáltak a régebbi Forzák az NVIDIA új drivereivel
- Fejhallgató erősítő és DAC topik
- VR topik (Oculus Rift, stb.)
- NVIDIA GeForce RTX 5080 / 5090 (GB203 / 202)
- Kormányok / autós szimulátorok topikja
- Pánikban a világ a Radeon RX 5000 és 6000 sorozat támogatása miatt
- Apple asztali gépek
- Mikrokontrollerek Arduino környezetben (programozás, építés, tippek)
- AMD K6-III, és minden ami RETRO - Oldschool tuning
- NVIDIA GeForce RTX 5070 / 5070 Ti (GB205 / 203)
- Hobby elektronika
Ú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?:))
- Xiaomi 15 - kicsi telefon nagy energiával
- Kis méret, nagy változás a Motorolánál
- Fejhallgató erősítő és DAC topik
- Black Friday november 29. / Cyber Monday december 2.
- Autós topik
- VR topik (Oculus Rift, stb.)
- NVIDIA GeForce RTX 5080 / 5090 (GB203 / 202)
- Építő/felújító topik
- GTA VI
- Renault, Dacia topik
- További aktív témák...
- GYÖNYÖRŰ iPhone 13 mini 128GB Starlight -1 ÉV GARANCIA -Kártyafüggetlen, MS3891, 100% Akkumulátor
- Eladó egy oneplus 9 pro 256/12
- ŐSZI BOMBA AKCIÓK! PSN, STEAM, UBISOFT CONNECT, EA APP, XBOX EREDETI KULCSOK 100% GARANCIA
- GYÖNYÖRŰ iPhone 12 mini 128GB Blue -1 ÉV GARANCIA - Kártyafüggetlen, MS3853, 100% Akkumulátor
- Xiaomi Redmi Note 14 Pro+ 5G 256GB, Kártyafüggetlen, 1 Év Garanciával
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest
Cég: NetGo.hu Kft.
Város: Gödöllő


