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