Simplificada la interfaz, ahora la pass por defecto es ninguna
This commit is contained in:
parent
35706bb654
commit
987a88cb63
@ -5,5 +5,6 @@
|
||||
<classpathentry kind="lib" path="mariadb-java-client-2.5.2-javadoc.jar"/>
|
||||
<classpathentry kind="lib" path="mariadb-java-client-2.5.2-sources.jar"/>
|
||||
<classpathentry kind="lib" path="mariadb-java-client-2.5.2.jar"/>
|
||||
<classpathentry kind="lib" path="LGoodDatePicker-10.4.1.jar"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
|
BIN
LGoodDatePicker-10.4.1.jar
Normal file
BIN
LGoodDatePicker-10.4.1.jar
Normal file
Binary file not shown.
@ -45,7 +45,7 @@ public class ControladorAniaidr implements ActionListener{
|
||||
case "aniadir":{
|
||||
this.modelo.insertarTransaccion(this.vista.insertarNombre.getText(),
|
||||
Float.parseFloat(this.vista.insertarDinero.getText()),
|
||||
this.vista.insertarFecha.getText());
|
||||
this.vista.calendario.getDate().toString());
|
||||
break;
|
||||
}
|
||||
case "mostrar":{
|
||||
|
@ -23,6 +23,7 @@ public class Main {
|
||||
frame.add(pestanias);
|
||||
frame.setVisible(true);
|
||||
}catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
System.out.println("Error inesperado"
|
||||
+ "\nPuede que no este bien definida su contrasenia de MySQL"
|
||||
+ "\nIntroducela:");
|
||||
|
@ -1,6 +1,7 @@
|
||||
import java.awt.Dimension;
|
||||
import java.awt.GridBagConstraints;
|
||||
import java.awt.GridBagLayout;
|
||||
import java.time.LocalDate;
|
||||
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JPanel;
|
||||
@ -8,14 +9,15 @@ import javax.swing.JPasswordField;
|
||||
import javax.swing.JTabbedPane;
|
||||
import javax.swing.JTextField;
|
||||
|
||||
import com.github.lgooddatepicker.components.DatePicker;
|
||||
|
||||
public class VistaAniadir extends JPanel{
|
||||
JTabbedPane pestanias;
|
||||
JTextField textoNombre;
|
||||
JTextField textoDinero;
|
||||
JTextField textoFecha;
|
||||
JTextField insertarNombre;
|
||||
JTextField insertarDinero;
|
||||
JTextField insertarFecha;
|
||||
DatePicker calendario;
|
||||
JButton mostrarTodo;
|
||||
JButton aniadir;
|
||||
JButton editar;
|
||||
@ -43,12 +45,14 @@ public class VistaAniadir extends JPanel{
|
||||
constrain.gridx = 0;
|
||||
constrain.gridy = 1;
|
||||
this.add(this.textoDinero, constrain);
|
||||
this.textoFecha = new JTextField("fecha");
|
||||
this.textoFecha.setEditable(false);
|
||||
this.calendario = new DatePicker();
|
||||
this.calendario.setDate(LocalDate.now());
|
||||
constrain.gridx = 0;
|
||||
constrain.gridy = 2;
|
||||
this.add(this.textoFecha, constrain);
|
||||
constrain.gridwidth = 2;
|
||||
this.add(this.calendario, constrain);
|
||||
|
||||
constrain.gridwidth = 1;
|
||||
this.insertarNombre = new JTextField();
|
||||
this.insertarNombre.setPreferredSize(new Dimension(80, 17));
|
||||
constrain.gridx = 1;
|
||||
@ -59,11 +63,6 @@ public class VistaAniadir extends JPanel{
|
||||
constrain.gridx = 1;
|
||||
constrain.gridy = 1;
|
||||
this.add(this.insertarDinero, constrain);
|
||||
this.insertarFecha = new JTextField();
|
||||
this.insertarFecha.setPreferredSize(new Dimension(80, 17));
|
||||
constrain.gridx = 1;
|
||||
constrain.gridy = 2;
|
||||
this.add(this.insertarFecha, constrain);
|
||||
|
||||
this.aniadir = new JButton("aniadir");
|
||||
constrain.gridx = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user