No me gusto como quedaba el codigo al colocar un boton de salida, por ahora se debera usar el nativo del sistema
This commit is contained in:
@@ -65,10 +65,6 @@ public class InformesController {
|
||||
frame.setLocationRelativeTo(null);
|
||||
frame.setVisible(true);
|
||||
});
|
||||
|
||||
this.view.getSalirButton().addActionListener(e -> {
|
||||
((JFrame) this.view.getContentPanel().getParent().getParent().getParent()).dispose();
|
||||
});
|
||||
}
|
||||
|
||||
private void generarInformeLibroDeVentasListener() {
|
||||
|
||||
@@ -36,9 +36,6 @@ public class MainController {
|
||||
|
||||
this.executeView(view.getContentPanel(), "Informes Mensuales", new Dimension(250, 500));
|
||||
});
|
||||
this.view.getSalirButton().addActionListener(e -> {
|
||||
System.exit(0);
|
||||
});
|
||||
}
|
||||
|
||||
private void executeView(JComponent view, String title, Dimension d){
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="ae41b" layout-manager="GridLayoutManager" row-count="5" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<grid id="ae41b" layout-manager="GridLayoutManager" row-count="4" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="10" left="10" bottom="10" right="10"/>
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
@@ -45,14 +45,6 @@
|
||||
<text value="Estado Resultado"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="64177" class="javax.swing.JButton" binding="salirButton" default-binding="true">
|
||||
<constraints>
|
||||
<grid row="4" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text value="Salir"/>
|
||||
</properties>
|
||||
</component>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
|
||||
@@ -54,9 +54,6 @@ public class InformesView {
|
||||
return estadoResultadoButton;
|
||||
}
|
||||
|
||||
public JButton getSalirButton() {
|
||||
return salirButton;
|
||||
}
|
||||
|
||||
{
|
||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||
@@ -76,7 +73,7 @@ public class InformesView {
|
||||
contentPanel = new JPanel();
|
||||
contentPanel.setLayout(new GridLayoutManager(1, 1, new Insets(10, 10, 10, 10), -1, -1));
|
||||
final JPanel panel1 = new JPanel();
|
||||
panel1.setLayout(new GridLayoutManager(5, 1, new Insets(10, 10, 10, 10), -1, -1));
|
||||
panel1.setLayout(new GridLayoutManager(4, 1, new Insets(10, 10, 10, 10), -1, -1));
|
||||
contentPanel.add(panel1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
|
||||
panel1.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Informes Mensuales"));
|
||||
generarLibroVentasButton = new JButton();
|
||||
@@ -90,9 +87,6 @@ public class InformesView {
|
||||
estadoResultadoButton = new JButton();
|
||||
estadoResultadoButton.setText("Estado Resultado");
|
||||
panel1.add(estadoResultadoButton, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
salirButton = new JButton();
|
||||
salirButton.setText("Salir");
|
||||
panel1.add(salirButton, new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="bc8d7" binding="buttonPanel" layout-manager="GridLayoutManager" row-count="4" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<grid id="bc8d7" binding="buttonPanel" layout-manager="GridLayoutManager" row-count="3" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="10" left="10" bottom="10" right="10"/>
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
@@ -37,14 +37,6 @@
|
||||
<text value="Informes Mensuales"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="5a8d1" class="javax.swing.JButton" binding="salirButton" default-binding="true">
|
||||
<constraints>
|
||||
<grid row="3" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text value="Salir"/>
|
||||
</properties>
|
||||
</component>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
|
||||
@@ -35,9 +35,6 @@ public class MainView {
|
||||
return informesGeneralesButton;
|
||||
}
|
||||
|
||||
public JButton getSalirButton() {
|
||||
return salirButton;
|
||||
}
|
||||
|
||||
{
|
||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||
@@ -57,7 +54,7 @@ public class MainView {
|
||||
contentPanel = new JPanel();
|
||||
contentPanel.setLayout(new GridLayoutManager(1, 1, new Insets(10, 10, 10, 10), -1, -1));
|
||||
buttonPanel = new JPanel();
|
||||
buttonPanel.setLayout(new GridLayoutManager(4, 1, new Insets(10, 10, 10, 10), -1, -1));
|
||||
buttonPanel.setLayout(new GridLayoutManager(3, 1, new Insets(10, 10, 10, 10), -1, -1));
|
||||
contentPanel.add(buttonPanel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
|
||||
buttonPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), null));
|
||||
cajasButton = new JButton();
|
||||
@@ -68,9 +65,6 @@ public class MainView {
|
||||
informesMensualesButton = new JButton();
|
||||
informesMensualesButton.setText("Informes Mensuales");
|
||||
buttonPanel.add(informesMensualesButton, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
salirButton = new JButton();
|
||||
salirButton.setText("Salir");
|
||||
buttonPanel.add(salirButton, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user