diff --git a/src/main/java/danielcortes/xyz/controllers/EgresosController.java b/src/main/java/danielcortes/xyz/controllers/EgresosController.java index d55b9fb..f303b87 100644 --- a/src/main/java/danielcortes/xyz/controllers/EgresosController.java +++ b/src/main/java/danielcortes/xyz/controllers/EgresosController.java @@ -32,8 +32,6 @@ import danielcortes.xyz.views.EgresosView; import danielcortes.xyz.views.components.EgresosTableModel; import javax.swing.*; -import javax.swing.event.ListSelectionEvent; -import java.awt.event.ActionEvent; import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; @@ -95,6 +93,7 @@ public class EgresosController { this.updateTotalEgresos(); this.clearInputs(); } + this.resetFocus(); } private void eliminarActionListener(){ @@ -232,4 +231,8 @@ public class EgresosController { this.view.getValorField().setText(""); this.view.getDescripcionField().setText(""); } + + private void resetFocus(){ + this.view.getNroField().requestFocus(); + } } diff --git a/src/main/java/danielcortes/xyz/controllers/IngresosController.java b/src/main/java/danielcortes/xyz/controllers/IngresosController.java index c5bc802..f2f706d 100644 --- a/src/main/java/danielcortes/xyz/controllers/IngresosController.java +++ b/src/main/java/danielcortes/xyz/controllers/IngresosController.java @@ -32,9 +32,6 @@ import danielcortes.xyz.views.IngresosView; import danielcortes.xyz.views.components.IngresosTableModel; import javax.swing.*; -import javax.swing.event.ListSelectionEvent; -import javax.xml.bind.SchemaOutputResolver; -import java.awt.event.ActionEvent; import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; @@ -94,6 +91,7 @@ public class IngresosController { this.clearInputs(); this.updateTotalIngresos(); } + this.resetFocus(); } private void eliminarActionListener() { @@ -191,4 +189,8 @@ public class IngresosController { this.view.getTipoCombo().setSelectedIndex(0); this.view.getValorField().setText(""); } + + private void resetFocus(){ + this.view.getTipoCombo().requestFocus(); + } } diff --git a/src/main/java/danielcortes/xyz/views/EgresosView.form b/src/main/java/danielcortes/xyz/views/EgresosView.form index ad28e7d..a0b1363 100644 --- a/src/main/java/danielcortes/xyz/views/EgresosView.form +++ b/src/main/java/danielcortes/xyz/views/EgresosView.form @@ -1,7 +1,7 @@
- + diff --git a/src/main/java/danielcortes/xyz/views/IngresosView.form b/src/main/java/danielcortes/xyz/views/IngresosView.form index 738983e..cbdb79f 100644 --- a/src/main/java/danielcortes/xyz/views/IngresosView.form +++ b/src/main/java/danielcortes/xyz/views/IngresosView.form @@ -1,7 +1,7 @@ - + diff --git a/src/main/java/danielcortes/xyz/views/ManagerView.form b/src/main/java/danielcortes/xyz/views/ManagerView.form index e862d4e..eb855d7 100644 --- a/src/main/java/danielcortes/xyz/views/ManagerView.form +++ b/src/main/java/danielcortes/xyz/views/ManagerView.form @@ -1,47 +1,42 @@ - - + + - + - + + + + + + + + + - + - - + - + - + - - - - - - - - - - - - - + @@ -49,10 +44,19 @@ - + - - + + + + + + + + + + + @@ -62,14 +66,10 @@ - - - - - - - - + + + +