From 773e7ed86f1b533ed9e7e0c1cdd93b852849061c Mon Sep 17 00:00:00 2001 From: TastyBookman <72633350+BookmanTasty@users.noreply.github.com> Date: Sun, 11 Oct 2020 22:57:49 -0500 Subject: [PATCH] Simple GUI is working Simple GUI is working --- bin/Gui$2.class | Bin 837 -> 837 bytes bin/Gui$3.class | Bin 618 -> 821 bytes bin/Gui.class | Bin 4451 -> 4383 bytes bin/PngGen.class | Bin 3618 -> 3700 bytes bin/gui$4.class | Bin 618 -> 821 bytes src/Gui.java | 31 +++++++++++++++++++------------ src/PngGen.java | 5 +++-- 7 files changed, 22 insertions(+), 14 deletions(-) diff --git a/bin/Gui$2.class b/bin/Gui$2.class index fc3ecd275b83a3c94413d54ad638a391ab5c19e4..ea449874c79cacb05834cea0b539ac47af2b2bc8 100644 GIT binary patch delta 31 ncmX@gc9d4dA%6e8N3zW%2+3jm`)9 delta 31 ncmX@gc9d4c|91|89W*I7`zyy8GI-IW%2+3jYtRZ diff --git a/bin/Gui$3.class b/bin/Gui$3.class index a6b2580d34ac446ad4e18bc09164e6b51d4ee3e0..b475952c9a4736e320c647ca7cc6c1afcad4d667 100644 GIT binary patch delta 530 zcmZvY-AV#c5Xb*#6+hNZH&gqv?89nZEz7RT=q4hJtsui73R-iKjm^lf?8;{l?|X+p z4Z7$7dXyd_nxjHN9hft7nE(7{=6u?_4)Npb?H#~2He2F(Q>^P&)XH1geT^ZY-RgC{ zk*qwLrDF0>)ANRvW^nA7C9}HA5LUEe%}oENiscyWd-nyy4F;bCCtN%lmEeXb!iF&k z9t0R{3YYpcvt%6C?pn`D2OpQD@OIqXjB=3%5Q>efQaSV5q4r*N1*+{QcXdY z`3`{W=Nr(631l8fwA2ViTlBV(_o?wNylSEgS$&27r7sN9?I0m=fe_uih@=?D1bK!@ zObs!ogyGu|Tiyh4M5dFb<``s>SrYi(--N%Lor9&)1pdwCSI}(Hxu!=SE UcKX32HYgG)#|PmjMJ6Ep4O9bJ6951J delta 310 zcmYL@%}T>i5QV>+gfzKc_12#nf1=hZXvB@UQW3$03W_T&xGO3pn-)r4`wXQ|BG?Kp zd;s0}96p3NHx?Y2nKQ#VXJ!z72m0gZ?H$->qo?aT;bGp&yGM#>^P>5fA8g$yf|K_B zLyThFP$JU!Od4Wr@2i_8ER>j6_`)_UVioaSqtk43&M!~biKERl*lU|9@2R#=rDkWi&2$UW&^aIr4wk^BM{EFmxe diff --git a/bin/Gui.class b/bin/Gui.class index c1dcf02874bd8c66d648e92eafddf932396bd252..4fd4f249b1b529710072274fc180f728c5b68623 100644 GIT binary patch delta 1704 zcmZXUX>=216o#K6%cOCnC8tmd_^Zu+r@2XGfr8^f&mvD_Ze+1P=*z9B^gQ4V*a>i-jXH&t5>MFY2|KF-o?wGN z5b&sk6)e7m{=v7~si#3Bm4yl!!z*R4u=3_yg_$)r7AquoWttgT=n4Bn5tSvkc4Zo2 zr;!Hzg1JH;Z^Yz*{mu6pDDmc2@C} z%4&t7`hS+87LBKQM!#q&v8`gQ#yZyPdDh{!W^_aNMtzR8SK+e?snyybTlloIu?UI#YmImV6UwLC_)MRllxJ<`jK=5swxqry zjL(#c(JM<~X< z1=e(HC-v^EbaRYIl-l^oBI86&S37Bx6HAPT6K-0$n*+?H11~38 zz-fs%ONjH-aghl9B>nURB6;M?s+ir9VW}7}gAFX>5s?y+*-oZmmnm-7 zZDJInzPsp8747LFC0~?}5}8FJY@CQHl|RK)Rxp#*arzMnXV>xfU96T~0g40|K% zpe#qRz`AaPT_dn-1$Ldlt{3+=i13Y!W;2CsVZ3}7DrlifJ_4=DX?G;hvah0z?m{z3 z>0EwSyNxcI={C$J7w9*ccjI^d&~tjE X^{b!&9RI!M*v-0>Hc%uSLv1NXLr6PvjHMhg&{`;1X{%-iD{ELnFeD|Lrc{og zpd1lIo}v^LJCDQ((XkW+r(r|LgsZx4XXRe35kG z;=v;TD)8rSX@WT+VirT5SBVCcXklGQ3CDt=kRl+$Us!7qt>EC zgAq+YtfOd%1P#>G%3z-AZfB?N!2YMU&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!ZGSDv;2?HlLqSoi<{ delta 309 zcmYL@%}T>i5QV>+gfzKc_12#nwbj}x*oYf(r6NK%E?fwLE+zg@vQa2?-DfC$62U6C z=mT`+bNCSA+*oj6X3h-foS9Mh9q7r==NLF*XP|HP!;}0e@0}{5-HXmke%!iN1nuXC z#~8(|p+uzdnK#7P!B?-EuvTJK;S1Zaj#b3>S+|pQ+gHPhy7U{^Va+?}D{GxvPI;0s zS`23d9m?!BI^7##(hufd3r<;TC>*$DL8>XRW|1YC6w6em4rkJxLzKQ@-dXwA>tdhD o-MjO`r1D3cnuvrdHIWBwh=Io@b?E^KTQmi^C*2D!wk181U(m=Q1ONa4 diff --git a/src/Gui.java b/src/Gui.java index fe704a4..1763ad6 100644 --- a/src/Gui.java +++ b/src/Gui.java @@ -56,13 +56,15 @@ public gui() { /** * Initialize the contents of the frame. */ - private void initialize() { + public void initialize() { frmvouchersGeneradorDe = new JFrame(); frmvouchersGeneradorDe.setTitle("99Vouchers Generador de Fichas"); frmvouchersGeneradorDe.setResizable(false); frmvouchersGeneradorDe.setBounds(100, 100, 568, 302); frmvouchersGeneradorDe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + + JPanel panel = new JPanel(); frmvouchersGeneradorDe.getContentPane().add(panel, BorderLayout.SOUTH); @@ -81,34 +83,40 @@ public void actionPerformed(ActionEvent e) { JPanel panel_1 = new JPanel(); frmvouchersGeneradorDe.getContentPane().add(panel_1, BorderLayout.NORTH); + JLabel lblSEL = new JLabel(rdyI); + JLabel lblCSV = new JLabel(rdyC); + JButton loadIMG = new JButton("Cargar Plantilla"); loadIMG.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { cargarIMG(); - + lblSEL.setText(rdyI); + } }); - panel_1.add(loadIMG); + JButton loadCSV = new JButton("Cargar Usuarios"); loadCSV.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { cargarCSV(); + lblCSV.setText(rdyC); + } }); - JLabel lblSEL = new JLabel(rdyI); + panel_1.add(loadIMG); panel_1.add(lblSEL); panel_1.add(loadCSV); - - - JLabel lblCSV = new JLabel(rdyC); panel_1.add(lblCSV); - Canvas canvas = new Canvas(); - frmvouchersGeneradorDe.getContentPane().add(canvas, BorderLayout.CENTER); + } + + + + private void cargarIMG() { @@ -123,9 +131,8 @@ private void cargarIMG() { if (returnValue == JFileChooser.APPROVE_OPTION) { File selectedFile = jfc.getSelectedFile(); - archIMG = selectedFile.getAbsolutePath(); - rdyI = "Seleccionado"; - + archIMG = selectedFile.getAbsolutePath(); + rdyI = "Seleccionado"; } } diff --git a/src/PngGen.java b/src/PngGen.java index 75fb615..129525d 100644 --- a/src/PngGen.java +++ b/src/PngGen.java @@ -8,6 +8,7 @@ import java.io.FileReader; import java.io.IOException; import javax.imageio.ImageIO; +import javax.swing.JOptionPane; public class PngGen { @@ -47,8 +48,8 @@ public static void csvRead(String pngFile, String csvFile, String salCSV) { } catch (IOException e) { e.printStackTrace(); } catch (java.lang.ArrayIndexOutOfBoundsException e) { - System.out.println("Se ha terminado de convertir el csv"); - System.out.println("Se generaron " + j + " fichas a partir del csv"); + System.out.println("Se generaron " + j + " fichas a partir del csv"); + JOptionPane.showMessageDialog (null, "Se generaron " + j + " fichas a partir del csv"); } finally { if (br != null) { try {