Aniadida barra y funcionalidades extra

This commit is contained in:
2019-11-15 17:18:58 +01:00
parent 18238bd6b8
commit cc5f59b5aa
7 changed files with 224 additions and 7 deletions

View File

@@ -10,6 +10,7 @@ import java.util.ArrayList;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JMenuItem;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JTabbedPane;
@@ -31,9 +32,12 @@ public class Menu extends JFrame{
Meses meses;
ArrayList<VistaAniadirVisualizar> pestanias;
ArrayList<ControladorAniadirVisualizar> controladores;
BarraOpciones barra;
protected Gestion datosGastos;
protected Gestion datosIngresos;
public Menu() {
this.barra = new BarraOpciones();
ControladorBarra controladorBarra = new ControladorBarra(barra, this);
this.nombreDatos = ".mes";
setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
@@ -50,10 +54,14 @@ public class Menu extends JFrame{
this.setLayout(new GridBagLayout());
this.panel = new VistaPanelLateral(constrain, this.meses);
this.panelCentral = new JPanel();
constrain.fill = GridBagConstraints.VERTICAL;
constrain.fill = GridBagConstraints.HORIZONTAL;
constrain.gridx = 0;
constrain.gridy = 0;
constrain.weightx = 10;
this.add(this.barra);
constrain.fill = GridBagConstraints.VERTICAL;
constrain.gridx = 1;
constrain.gridy = 1;
constrain.weightx = 2;
this.panelCentral.add(pestania,constrain);
getContentPane().add(pestania);
@@ -63,6 +71,10 @@ public class Menu extends JFrame{
setLocationRelativeTo(null);
ControladorPanelLateral controlador3 = new ControladorPanelLateral(this.panel, this);
this.listenerPestania();
constrain.fill = GridBagConstraints.VERTICAL;
constrain.gridx = 2;
constrain.gridy = 1;
constrain.weightx = 2;
this.add(this.panel);
}