From b161eecd2c99a0f64e02c7eea7e6af43e4abe81e Mon Sep 17 00:00:00 2001 From: vigliom Date: Mon, 10 Oct 2022 16:32:38 +0200 Subject: [PATCH] . --- Salida | 0 bin/jorpelu/com/MyCopy.class | Bin 3458 -> 3427 bytes bin/jorpelu/com/Ventana$1.class | Bin 1436 -> 1552 bytes bin/jorpelu/com/Ventana$2.class | Bin 705 -> 705 bytes bin/jorpelu/com/Ventana.class | Bin 1897 -> 1897 bytes src/jorpelu/com/MyCopy.java | 47 ++++++++++++++------------------ src/jorpelu/com/Ventana.java | 7 ++++- textop.dat | 0 8 files changed, 26 insertions(+), 28 deletions(-) create mode 100644 Salida create mode 100644 textop.dat diff --git a/Salida b/Salida new file mode 100644 index 0000000..e69de29 diff --git a/bin/jorpelu/com/MyCopy.class b/bin/jorpelu/com/MyCopy.class index 70747f7162cc217d56ecdcdfbecfc5d7b9a470c5..bdf478d23fb9a6c91b9efbed7d1f8aad33a36373 100644 GIT binary patch literal 3427 zcmZ`*`*#~h75>Juy|OfIWyMOOq@*n**p}@mNmIME(-7Ou!>JvI$S76XCak5ky|yfg z)hd3_Qc@D&w9uAE3#33vc!csU)N+VP2pphLUWG!Tz&V`5-vB?+V!qjxZOKU`TRS`V zoBR0gy)*Oj|1Mnta5w&;p-Lb)p0#pDx)4ofC!+&1z1iH1hH5phpVX(L`6)9q8a=qr z(kBf8UoLAUjf}02^QED`0@AM!8|f~Anql3tbb$?(;=@*U)H3q<9^E3S)+*R~UxsEJ zR5Y#AO3b!sj8aWW2MacFyUdJf?-pomx)yltOmmz*?ww8=Ior%;@)`mHYm}E!GaKz2 zT$X4E3T$!&j^)0LZCF+zXB(+yj6ij7Hf8wWK}bSkt$?SgIbH{W^%8aPsnG@rKYTup zZkBkP!uWf$leuh$BpG=%e~ZMeYQC1tnz|)$Q@@!p4izSc4QogrPLs%Be>SP7h>0c z4heXjq-IiC70_XccjE{r2^unOmD$jBsx5M`tiGJ%Y; z!nB50tdv6>Gw%}!tTe2ym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yFzWopJ?$l=>NqQ4M+H!rx#L#sLV8sYA`g6(*zA~3c>XmmhM3f t=jLhQO*m;aIp-OUn=nG>cWrMJ zmxhM+`e&M3s&j4a<-9yUIL~v=c?vv^*dO1oZ$O^f!1k+9ON&MPMtt^8{)-!@yF-uYEKs~=Rt*wuaYZW|Fyyt1gN@6Du< z(S0+X4z8Hf<_p

_1u^;Gsm719GBA9Lr9{xa5`y=udO%Zb7<>)JRA-Nu3lYEHfdF z0zP*>lLSRwDzT11M!aP1nhN$}v<$DPK0+?kzPXGV_ delta 266 zcmXAiJ4yp#6otQk{yWY%3ZhAvC-g=hrh`;kP{Mi<~ZEV2RRZ{5T+78WkR z!otM}BB*EZa^Lryb04Okrn0x6msenii!w`nxbpR|?(@{)?i`DQ$9^M>eK&mgj-5Id zs<~!m#wSKB;%#`hu3HP=)^256HgC^tmpJwraY+x)tWX7$VHoH4g|;hP)8U3y=5*Qk zSD{8-ll0i7Fa9P=>`5h3G&oT9;>8?tq|e7fwy@>&mo}E*5>65ddDZs5m=Neppont@ Usz#F;@}b&H>Q1$?ks_k`2fKVEQ2+n{ diff --git a/bin/jorpelu/com/Ventana$2.class b/bin/jorpelu/com/Ventana$2.class index d5a25f69f5f04ff8c4e79e07af39a1c31a3ef976..ec79d808ac575085475d31f37646bed36e2d7d53 100644 GIT binary patch delta 23 ecmX@edXRO4ITNGlWD6!6R!asJ2J6X{OdbGBR|SXw delta 23 ecmX@edXRO4ITNG7WD6!6Rucvm2D8bPOdbGA#szr* diff --git a/bin/jorpelu/com/Ventana.class b/bin/jorpelu/com/Ventana.class index b782ebfd636fc1e0f8dacc0fb8758efdc569c2f0..bc3f7184f57983d634e16e190a231371b449fa9f 100644 GIT binary patch delta 124 zcmaFK_mXczEGw%igBpYF<|Ni6##BcJZU!d?2?l2dbp{s(BL-I>&yB&K!JQ$V!Gj@- z!IPny!Hc1T!JAyZU$Qh2?jd`bq0F|BL)WsCk96be;^sp;LMQ4 z;KESN;L6a!;KneM!JT0lg9pQQ22X~=3|^XCc6UwFFhEH diff --git a/src/jorpelu/com/MyCopy.java b/src/jorpelu/com/MyCopy.java index 492a9ff..b942aca 100644 --- a/src/jorpelu/com/MyCopy.java +++ b/src/jorpelu/com/MyCopy.java @@ -10,12 +10,12 @@ import javax.swing.JProgressBar; public class MyCopy extends JFrame{ - private JLabel Porcentaje; + private JLabel porcentaje; private JProgressBar barra; - private String RutaIn, RutaOut; - public MyCopy(String in, String out) throws IOException { - RutaIn = in; - RutaOut = out; + private String rutaIn, rutaOut; + public MyCopy(String in, String out) throws IOException, InterruptedException { + rutaIn = in; + rutaOut = out; Componentes(); Copiar(); @@ -25,9 +25,9 @@ public class MyCopy extends JFrame{ barra = new JProgressBar(); barra.setBounds(125, 65, 150, 10); add(barra); - Porcentaje = new JLabel(); - Porcentaje.setBounds(190,-45,100,150); - add(Porcentaje); + porcentaje = new JLabel(); + porcentaje.setBounds(190,-45,100,150); + add(porcentaje); //setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setSize(400,150); setLocationRelativeTo(null); @@ -37,9 +37,9 @@ public class MyCopy extends JFrame{ setTitle("Copiando"); } - public void Copiar() throws IOException { - File fich = new File(RutaOut); - File fich_a_copiar = new File(RutaIn); + public void Copiar() throws IOException, InterruptedException { + File fich = new File(rutaOut); + File fich_a_copiar = new File(rutaIn); if(fich_a_copiar.exists() == false) { fich_a_copiar.createNewFile(); } @@ -49,37 +49,30 @@ public class MyCopy extends JFrame{ DataOutputStream dout = new DataOutputStream(out); String[] calculando = {"-", "\\", "|", "/"}; int cal=0; - int i=0; int c; ArrayList bufferin = new ArrayList(); while((c = din.read() ) != -1 && bufferin.add(c)) { - Porcentaje.setText(calculando[cal]); + porcentaje.setText(calculando[cal]); + porcentaje.update(porcentaje.getGraphics()); cal++; if (cal >= 4) cal = 0; - try { - Thread.sleep(50); - } catch (InterruptedException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } + Thread.sleep(40); } for(int j = 0; j