El dialog que pregunta por el tipo egreso presentaba mal el texto de este mismo, se ocupo el wraper para solucionarlo
This commit is contained in:
BIN
dist/local-release/Programa Caja.jar
vendored
BIN
dist/local-release/Programa Caja.jar
vendored
Binary file not shown.
@@ -26,21 +26,21 @@ package danielcortes.xyz.views;
|
|||||||
|
|
||||||
import com.intellij.uiDesigner.core.GridConstraints;
|
import com.intellij.uiDesigner.core.GridConstraints;
|
||||||
import com.intellij.uiDesigner.core.GridLayoutManager;
|
import com.intellij.uiDesigner.core.GridLayoutManager;
|
||||||
import danielcortes.xyz.models.tipo_egreso.SQLiteTipoEgresoDAO;
|
import danielcortes.xyz.data.DAOManager;
|
||||||
import danielcortes.xyz.models.tipo_egreso.TipoEgreso;
|
import danielcortes.xyz.models.tipo_egreso.TipoEgreso;
|
||||||
|
import danielcortes.xyz.models.tipo_egreso.TipoEgresoToStringWrapper;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.event.KeyEvent;
|
import java.awt.event.KeyEvent;
|
||||||
import java.awt.event.WindowAdapter;
|
import java.awt.event.WindowAdapter;
|
||||||
import java.awt.event.WindowEvent;
|
import java.awt.event.WindowEvent;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class TipoEgresoSelectDialog extends JDialog {
|
public class TipoEgresoSelectDialog extends JDialog {
|
||||||
private JPanel contentPane;
|
private JPanel contentPane;
|
||||||
private JButton buttonOK;
|
private JButton buttonOK;
|
||||||
private JButton buttonCancel;
|
private JButton buttonCancel;
|
||||||
private JComboBox<TipoEgreso> tipoEgresoCombo;
|
private JComboBox<TipoEgresoToStringWrapper> tipoEgresoCombo;
|
||||||
|
|
||||||
private boolean acepted;
|
private boolean acepted;
|
||||||
|
|
||||||
@@ -90,11 +90,9 @@ public class TipoEgresoSelectDialog extends JDialog {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void createTipoEgresoCombo() {
|
private void createTipoEgresoCombo() {
|
||||||
List<TipoEgreso> tiposEgreso = new SQLiteTipoEgresoDAO().findAll();
|
|
||||||
tipoEgresoCombo = new JComboBox<>();
|
tipoEgresoCombo = new JComboBox<>();
|
||||||
|
for (TipoEgreso tipoEgreso : DAOManager.getTipoEgresoDAO().findAll()) {
|
||||||
for (TipoEgreso tipoEgreso : tiposEgreso) {
|
tipoEgresoCombo.addItem(new TipoEgresoToStringWrapper(tipoEgreso));
|
||||||
tipoEgresoCombo.addItem(tipoEgreso);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user