Hirdetés
- 8 GB VRAM-mal dominálhat idén a GeForce RTX 50 sorozat
- Az AMD szerint Radeonokból nem lesz hiány
- CES 2026: igazi mindenes a Lenovo legújabb, 4K-s QD-OLED monitora
- A Micron szerint nem dobbantott a végfelhasználói piacról a Crucial eltűnésével
- Beépített hangszórót is kapott az MSI legfrissebb mini PC-je
Ú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?:))
- Őrült módjára szabja át AI-ra a GeForce-okat Kína
- Samsung LCD és LED TV-k
- Milyen videókártyát?
- Milyen switch-et vegyek?
- AMD vs. INTEL vs. NVIDIA
- ASZTALI GÉP / ALKATRÉSZ beárazás
- Motorolaj, hajtóműolaj, hűtőfolyadék, adalékok és szűrők topikja
- Motoros topic
- Luck Dragon: Asszociációs játék. :)
- Kerékpárosok, bringások ide!
- További aktív témák...
- Apple iPhone 13 Pro Max /128GB / Kártyafüggetlen / 12Hó Garancia / Akku:83%
- Apple iPhone XR / 64GB / Kártyafüggetlen /12Hó Garancia / Akku: 91%
- Apple Watch Series 10 46mm Jet Black
- Samsung Galaxy A33 5G / 6/128GB / Kártyafüggetlen / 12Hó Garancia
- Xiaomi 11 Lite / 6/128GB / Kártyafüggetlen / 12Hó Garancia
- Samsung Galaxy Watch 6 Classic, Kártyafüggetlen, 1 Év Garanciával
- Huawei Watch 5 Titanium 46mm
- Dell Latitude E7470. Olcsó üzleti kategóriás laptop! Új akkumulátor!
- Bomba ár! Lenovo ThinkPad L490 - i5-G8 I 16GB I 256SSD I 14" FHD Touch I HDMI I Cam I W11 I Gari!
- Samsung Galaxy S25 Ultra 256GB,Újszerű,Dobozaval,12 hónap garanciával
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest
Cég: Laptopszaki Kft.
Város: Budapest


