diff --git a/bin/jorpelu/com/MyCopy.class b/bin/jorpelu/com/MyCopy.class index 1d33c74..7063391 100644 Binary files a/bin/jorpelu/com/MyCopy.class and b/bin/jorpelu/com/MyCopy.class differ diff --git a/bin/jorpelu/com/Ventana.class b/bin/jorpelu/com/Ventana.class index 6d8ce9c..88dcf7f 100644 Binary files a/bin/jorpelu/com/Ventana.class and b/bin/jorpelu/com/Ventana.class differ diff --git a/src/jorpelu/com/MyCopy.java b/src/jorpelu/com/MyCopy.java index 09864ca..485e5a2 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)); }