From 194f0fac873b140463aa89763bf19c82d24c1f97 Mon Sep 17 00:00:00 2001 From: vigliom Date: Sun, 9 Oct 2022 00:51:12 +0200 Subject: [PATCH] =?UTF-8?q?No=20consigo=20que=20me=20salga=20la=20ventana?= =?UTF-8?q?=20de=20dise=C3=B1o?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/jorpelu/com/MyCopy.class | Bin 2855 -> 3014 bytes bin/jorpelu/com/Ventana.class | Bin 1240 -> 1429 bytes src/jorpelu/com/MyCopy.java | 5 ++++- src/jorpelu/com/Ventana.java | 23 +++++++++++++++-------- 4 files changed, 19 insertions(+), 9 deletions(-) diff --git a/bin/jorpelu/com/MyCopy.class b/bin/jorpelu/com/MyCopy.class index 1d33c7473c03347dfd8d49a9b9e2797aeb5f6192..7063391cc6b9b5114bf90c7ad8025172df4ba319 100644 GIT binary patch literal 3014 zcma)8U2q%K75=VeY1iwuB+HhG0)zxeupzcW2yT#rNpNgX>d0Uj2Zc~~Ev@Z!WJyS? z#HN%MaDO2sg%;Yhg{CdIYylKq!Y0%K7qa8s3&w*;pEuEX%c8xbd z;0hgXcm#aIR>q7K=O)ekm@%0)S^ID{X{5)Eyd~eOAG@l)oYEQ8%1rk;-si)G(|idZ z8Oj@TW?$F11{bc9si-okZ91;Oc2=G-=LuGOXICYsT0aV|70?|(Sk{o0HdS2DFFhyX zM%qdlJt@Q1umiiK*Bc1ICb`JCJJ6-$M%+XQ%z3L|7aZ7+OGUSi9;s+a5-!_}nWtqK z4STRx!OiU7YV_#H;C#}|*;Y2A;})m{D92)nvynVGmN$}Y->vm6a==jWB>~Z`;x;}` zs9^WSBPwp^Bdp*K;=LL{2CiwHhJGB9h22R~tT#+r5ljV#YnC21Y@=@J0NNDXC9tK| z`AE@TBZh_{98z$k#zZ=)H;H0cCU8_Bw4Ok%iId34DoPH?59Ra5!Z1PB5W`iHyQ4bd z7$fA_A{)I<(|aoLRcSho`xP8pb;WkqsC6V{d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a2 100644 --- a/src/jorpelu/com/MyCopy.java +++ b/src/jorpelu/com/MyCopy.java @@ -4,10 +4,13 @@ import java.io.*; import java.util.ArrayList; import java.util.Scanner; +import javax.swing.JFrame; +import javax.swing.JPanel; + public class MyCopy { static Scanner sc = new Scanner(System.in); - public MyCopy(){ + public MyCopy(String Ruta, JFrame jf){ String ficheroString = sc.next(); File fich = new File(".\\Salida.dat"); diff --git a/src/jorpelu/com/Ventana.java b/src/jorpelu/com/Ventana.java index b5f994d..e933925 100644 --- a/src/jorpelu/com/Ventana.java +++ b/src/jorpelu/com/Ventana.java @@ -1,5 +1,9 @@ package jorpelu.com; +import java.awt.FlowLayout; +import java.awt.GridLayout; + +import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; @@ -16,6 +20,7 @@ public class Ventana extends JFrame{ } public Ventana() { + Componentes(); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setSize(400,600); @@ -24,14 +29,16 @@ public class Ventana extends JFrame{ } public void Componentes() { - titulo = new JLabel(); - titulo.setBounds(getBounds()); - titulo.setText("Escriba la ruta de un archivo que quiera copiar: "); - add(titulo); - - ruta = new JTextField(); - ruta.setBounds(getBounds()); - + JPanel panel = new JPanel(); + JLabel texto = new JLabel("Introduzca la ruta del archivo a copiar: "); + JTextField ruta = new JTextField(""); + JButton confirmar = new JButton("Confirmar"); + texto.setSize(400,20); + panel.add(texto); + panel.add(ruta); + panel.add(confirmar); + add(panel); + panel.setLayout(new GridLayout(5,1)); }