- Nem tiltották be a Teslát Kaliforniában, Robotaxival ünnepelt a márka
- Apró változásokkal, elődjénél jobb áron kezd a Google Pixel 10a
- Visszatért a Snapdragonhoz az Infinix, itt a Note 60 és Note 60 Pro
- Esélyes, hogy drágul a Nothing Phone (4a) széria
- Lelkiismeret-furdalás nélkül zabálhatod a süteményt a Galaxy S26-tal
- Fotók, videók mobillal
- Samsung Galaxy S25 Ultra - titán keret, acélos teljesítmény
- Apró változásokkal, elődjénél jobb áron kezd a Google Pixel 10a
- Soundcore Sleep A30 - a hosszú házasság titka
- Asus Zenfone 10 - kicsit más az új kicsi
- Szinte csak formaság: bemutatkozott a Pixel 6 és Pixel 6 Pro
- Motorola Edge 50 Neo - az egyensúly gyengesége
- Milyen okostelefont vegyek?
- Samsung Galaxy A56 - megbízható középszerűség
- Google Pixel topik
Ú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?:))
- iPhone 16 Pro 256 GB 100% akku 2,5 év GARANCIA
- Eladó HP ProLiant Microserver Gen8 16 Gb RAM Xeon E3-1265L v2
- TP-LINK TL-SG105-M2 5-Port 2.5G asztali switch - Gar.: 2028.05.09
- Patriot Viper Venom RGB 2x16GB DDR5 6000MHz CL36 - Új, bontatlan, 5 év garancia - Eladó!
- ZOTAC RTX 5070 12GB GDDR7 Twin Edge - Új, Bontatlan - Eladó!
- 196 - Lenovo Legion Pro 5 (16IAX10) - Intel Core U7 255HX, RTX 5070 (ELKELT)
- ÁRGARANCIA!Épített KomPhone i5 12400F 16/32/64GB RAM RTX 5060 Ti 16GB GAMER PC termékbeszámítással
- iPhone 11 64GB 100% (3hónap Garancia)
- ÚJ Apple Airpods Pro 3 - www.stylebolt.hu - 1 Év Apple garancia - 27 százalékos Áfá-s száma !!!!
- Apple iPhone 14 Pro 128GB,Újszerű,Dobozaval,12 hónap garanciával
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest


